regex - perl regular expression to get the text between 5) some text 6) -
5) on 64bit os go c:\program files (x86)\common gateway 6) on 32 bit
in above example trying text between 5) , 6) on 64bit os go c:\program files (x86)\common gateway
i have written following 5[)]\s?(.*?)6[)]\s?/i getting fail here have (x86) expression match on 64bit os go c:\program files (x8
so thinking adding [^\/] skip x86)\ not working out...can 1 please help.
if read question correctly, want match 6) unless 6) part of string (x86). in case, use negative look-behind assertion:
/5\)\s?(.*?)(?<!\(x8)6\)\s?/i which say, ... match until 6) unless (x86).
Comments
Post a Comment