string StringIn = @"good:javascript( '', 0, ""http://www.domain.com""
);good:javascript( 'http://sub.domain.com' );bad:javascript( 'somevar',
'./index.aspx' );and I would hope to extract:";
MatchCollection allMatches = Regex.Matches(StringIn,
@"javascript\(.*?(http://
.*?)[""']",RegexOptions.Compiled|RegexOptions.IgnoreCase|RegexOptions.Singleline);
foreach (Match myMatch in allMatches)
{
if (myMatch.Success)
{
MessageBox.Show(myMatch.Groups[1].Value);
}
}
If there is anything you do not understand, ask away.