The theme is i opened a file and get all it's data into string and i am matching this string with the regex returning none. But the same regex in PHP is returning values for the same text using preg_match_all. Anyone having a idea?
+2
A:
The method in .NET that’s closest to preg_match_all()
is the static Regex.Matches(String,String) call, or the equivalent Matches
method on a compiled regular expression. It returns a MatchCollection
that you can use to count the matches and to loop over each one.
Can you provide some short, self-contained code to show what’s not working?
Carey
2009-07-22 09:09:44