VBS RegEx

  • Thread starter Thread starter SSFFCC
  • Start date Start date
S

SSFFCC

Guest
Hi all

in a VB Script where I use regex I have this line of code

fileContents=myregexp.Replace(fileContents,". " & Ucase("$2"))

where $2 reference in the match is a one-letter lowercase string I want to convert to uppercase. Turns out VBS completely ignores the UCASE in this instance, it merely puts back the lowercase letter - no uppercase conversion.

I guess you can't embed VBS functions within the regex.Replace?

Any way to get VBS convert the match to ucase anyway?


thanks

Continue reading...
 

Similar threads

Back
Top