CNTITDEPT
asked on
need regular expression
I suck at need regular expressions, can some one write one for me to:
I need a need regular expression to replace all charecters between > and < with a blank space.
example: hi this is a sentence la la la >replace all this with a blank space< ok now onto writing more
Thanks,
Ed
I need a need regular expression to replace all charecters between > and < with a blank space.
example: hi this is a sentence la la la >replace all this with a blank space< ok now onto writing more
Thanks,
Ed
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thogek:
One mistake in your code:
string strChanged = Regex.Replace(strOriginal, "> <");
should be:
string strChanged = reg.Replace(strOriginal, "> <");
Your way did not work untill I put it into a foreach statement, So now it does the job
Thanks,
Ed
One mistake in your code:
string strChanged = Regex.Replace(strOriginal,
should be:
string strChanged = reg.Replace(strOriginal, "> <");
Your way did not work untill I put it into a foreach statement, So now it does the job
Thanks,
Ed
Doh. Sorry 'bout that. But at least you figured it out. :-)
ASKER
That does not work, it does not find any matches