Hi,
I'm trying to write/find a regular expression for finding ampersands but not HTML entites
I have this which finds entities but can't quite figure out how to ignore entities and return unmatched "&"
Test string:Code:&[^\s]*;
I want to html encode the non-entity ampersands e.g.Code:This is sample test containing a bunch of & and entities. Do you shop at: M&S? &x#1234;
"bunch of & and" --> "bunch of & and"
Any help will be greatly appreciated
Cheers Al




Reply With Quote