[ale] Regex question

Chris Fowler cfowler at outpostsentinel.com
Thu Nov 6 13:22:15 EST 2008


I'm using POSIX regular expressions to escape all the XML special
characters from values in C.

I've walked through the tree and have replaced all the easy ones.
The problem I'm having now is with '&'.

I've tried this:

'&[^amp;|lt;|gt;]'

It works but if the document has  ' This & is called an ampersand.'
the regex tells me to replace '& ' (including space).  How can
I properly write the regex so that it only gives me a pointer to the
'&' and not the '&' and next character?

Chris


-- 
Chris Fowler
OutPost Sentinel, LLC
Support @ SIP/support at pbx.opsdc.com
 or 678-804-8193
Email Support @ support at outpostsentinel.com




More information about the Ale mailing list