in reply to Gimmie the Stuff Between Two Keywords

Hi!

I've really no idea how a Win32 system variable looks so I'm missing the context and can't really help you unless you post a formal spec how it can look.
Anyway, one of the problems in your regex: the word boundary \b will never match between the 's' and 'X' at the start of your regex. Neither will the one at the end of regex. The two other \b's will match as long as (.*?) starts and ends with a word character.
A \b matches between a \w and a \W i.e. between a word character (a-z,A-Z,0-9,_ and maybe other characters considered alpha numeric by the locale you use if you do so), and a non-word character (all characters that are not in \w).
Since I don't what kind of charaters should be extracted with (.*?) getting rid of the wrong \b's is all I can tell you right now.

cheers
snowcrash
  • Comment on Re: Gimmie the Stuff Between Two Keywords