E
Evgeny Zoldin
Hi All,
I want to capture the argument of some javascript function call in HTML
source code, namely HTML-Page contains
<script....>
func ( 'something1\'something2' );
</script...>
or
<script....>
func ( "something1\"something2" );
</script...>
I try to capture whole argument of the function call by the following:
string s = html_source;
Regex re = new Regex(@"(?<a>'.*?(?!<\)')"); // or new
Regex("(?<a>\".*?(?!<\\\\)\")");
Match m = re.Match(s);
Group g = m.Groups["a"];
string r = g.Value;
and here r is <'something1\'> but not <'something1\'something2'> as I want.
What's wrong?
Thanx
I want to capture the argument of some javascript function call in HTML
source code, namely HTML-Page contains
<script....>
func ( 'something1\'something2' );
</script...>
or
<script....>
func ( "something1\"something2" );
</script...>
I try to capture whole argument of the function call by the following:
string s = html_source;
Regex re = new Regex(@"(?<a>'.*?(?!<\)')"); // or new
Regex("(?<a>\".*?(?!<\\\\)\")");
Match m = re.Match(s);
Group g = m.Groups["a"];
string r = g.Value;
and here r is <'something1\'> but not <'something1\'something2'> as I want.
What's wrong?
Thanx