I have a regex stored within an Apache Camel XML file:
<simple>${body} regex '\s*<+.*'</simple>
I am trying to match the string:
<?xml
(the first part of an encoded XML file)
i.e. literally the characters <.
The Problem is that since this is contained in an XML file it is being treated as an encoded angle bracket and only matching <?xml.
Is there a way to escape this and make the match work for the encoded string?
You’ll have to double escape it: