Link to home
Start Free TrialLog in
Avatar of arthurh88
arthurh88

asked on

Can someone decipher this regex parameter?

HTML = Regex.Replace(HTML, "<p?.*"">[\r\n]*\s*</p>", "")

So this statement is searching for a condition in a string and replacing it with an empty string, but what exactly is this regex statement searching for?
Avatar of Russ Suter
Russ Suter

That's an odd regex. I can figure out the middle part easily enough but I'm not sure about the parts in angle brackets.

Download Expresso from Ultrapico. It's free and extremely useful.
ASKER CERTIFIED SOLUTION
Avatar of Russ Suter
Russ Suter

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of arthurh88

ASKER

so it requires 2 quotations consecutively like "" in order to match?
Maybe not. That might be a side effect of using a C# string. It might be one double quote character but either way I'm not sure what it's doing in there.
oh wait never mind, the double quote in the coding "" means just one quote for the regex.
thank you!