regex - Parse Nth matching column and split via single regular expression -


given below input line, need 4th column values on either side of slash character via single regex.

2323         va1/val1.2         val2/val2.2         val3/val3.2            down 

regex should match "val3/". likewise regexp match "/val3.2" spacing between columns fixed , 2nd,3rd,4th column pattern "anystring/anyotherstring"./` there.

i using custom tool expects input regexp choices limited. able parse via javascript code looking single regex have match , split of nth column.

you can 4th column following regex :

(?:[^ ]* +){3}([^ /]*) 

note need return group(1).

see demo https://regex101.com/r/km3rn2/2


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -