Reg expressions in the Machine.Config

  • Thread starter Thread starter John S
  • Start date Start date
J

John S

I've got several regular expression strings that I want to store in the
machine config. One of the strings contains a ampersand character. For some
reason this can't be stored in a string in the config. When the string
contains the & character the app throws errors on start. I've tried to put
the string in a CDATA element but that didn't seem to make a difference.

Anyone have any suggestions?

TIA

John
 
Finally saw the obvious on this one.
The & has to be entered as &

When the XML is parsed it will convert it to an & (same thing with the < ,
&lt;)

John
 
Back
Top