[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Why is \/ invalid in a regular expression?
On Tue, 20 Apr 2021 18:46:11 +0000, Roger L Costello wrote: > Why is \/ invalid? I have no idea. Anyone know why? Because it has the syntax of an escape, but '/' is not a defined escape character (or: "/ is not a valid second character in an escape sequence starting with \"). To avoid the problem, use '\\/'. This should give the result that you hope for. '\' alone is the first character of an escape sequence. The escape sequence '\\' means 'the character \'. Note that, depending upon context, it sometimes becomes necessary to escape things multiple times. This can happen, for example, if your Java code needs to embed an XML Schema regular expression. Amy! -- Amelia A. Lewis amyzing {at} talsever.com What's the end of a story? When you begin telling it. -- Ursula K. Le Guin
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|