Got more questions? Find advice on: ASP | SQL | XML | Windows
Welcome to RegexAdvice Sign in | Join | Help

Replacing with regexes in vb.net.

  •  02-19-2007, 1:20 PM

    Replacing with regexes in vb.net.

    Hi.

    I'm making editors for a few different languages with vb.net, and what I want to do is to automatically correct the case of certain keywords and pre-built functions. I could of course use something like "Regex.Replace("msgbox", "MsgBox", RegexOptions.IgnoreCase)", but doing that for every function of VBScript is very time-consuming. So if I have a regex like "(MsgBox|InputBox|CStr)", is there any way to use the Regex.Replace function to convert any match to the case in which it appears in the regex?

    Filed under:
View Complete Thread