c# - RegEx multiple matches after positive lookbehind possible (after word-wrap)? -


i new regular expressions , have following problem it:

text file being parsed:

keyworda:   123     93  0   0   524 0   0   78  0   0   6789    0   0 keywordb:   456     93  0   0   524 0   0   78  0   0   6789    0   0 keywordc:   789     93  0   0   524 0   0   78  0   0   6789    0   0 

now numbers 2 or more digits in next line after "keywordb: 456".

i tried expression /(?<=keywordb:\t456\n\t)(\d{2,})/g

but 1 first number (and because 93 number more 1 digit).

is possible appropriate matches regex want have multiple matches pattern after pattern , word-wrapping or have missed fundamental?

with .net can use variable-length lookbehinds:

(?<=^keywordb:\s*456\r?\n.*)\b\d{2,} 

(with multiline option)

demo


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -