Basics of a Split RegEx

  • 10 July 2017
  • 3 replies
  • 47 views

Badge +9

What does the below do....I'm not sure if the (.+] bracket is correct

_+/(.+]/[*/]+S

I found the above at https://threewill.com/getting-started-with-nintex/
but am having a hard time reading it and understanding

I searched Google for over an hour on Google for a primer on RegEx and did not find much.  Any suggestions would be great to help me understand the above and other basic information on RegEx would be great.


3 replies

Userlevel 6
Badge +15

Hello!

RegEx is a tricky beast. 

I like to use www.regexr.com to figure out what I need. 

 

What this is supposed to do is pull out the last string of characters between 2 forward slashes that come before the final string that doesn't have another forward slash.

But ... that one is odd. The +S doesn't work as far as I can see. 


This one is better, but just captures the full string up to the file.

_*/(.+)/[^/]+/

Check this out: 

RegExr: Learn, Build, & Test RegEx 

Are you looking to simulate what the blogger did, exactly? 

Badge +9

Correct. I am trying to replicate exactly what the blogger did...

Userlevel 5
Badge +14

regular expression on a posted link is hardly readable from picture but I believe it should have been this one

.*/(.+)/[^/]+$

I'd recommend to use Online regex tester and debugger: PHP, PCRE, Python, Golang and JavaScript  regular expression tester - it tries  to explain how does regular expression and its single patterns evaluate

205457_pastedImage_1.png

Reply