How to generate a string from a Regular Expression?
The following pseudo code shows how to print the internal regular expression as it was passed into the regex constructor :
[H]ello\s+[W]orld$
// output the internal regular expression Regex re = new Regex(@”[H]ello\s+[W]orld$”); Debug.WriteLine(re.ToString());
Log in to answer.
Mr.Wang 10:24 pm on October 24, 2009
The following pseudo code shows how to print the internal regular expression as it was passed into the regex constructor :
[H]ello\s+[W]orld$
// output the internal regular expression
Regex re = new Regex(@”[H]ello\s+[W]orld$”);
Debug.WriteLine(re.ToString());