[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How to split an RegEx into several lines for read
Thank you Abel,
I already read about such notorious use of RegExes. And a tip for making your regexes more readable: introduce comments inside your regexes. In other regex languages you can do that inside the regex language, but not with a regex in XSLT. You can easily fix this by putting your regexes inside a variable and always calling them with the 'x' modifier: I think this is probably the most amazing and useful tip I got in this thread -- fully deserves to be in the XSLT FAQ! I have never before seen a string variable defined in this way -- probably because we do nod have an "x" modifier (and modifiers at all) when generally defining variables. Also, I don't think I've ever seen before comments interspersed within the string contents of an xsl:variable. Very nice! -- Cheers, Dimitre Novatchev --------------------------------------- Truly great madness cannot be achieved without significant intelligence. --------------------------------------- To invent, you need a good imagination and a pile of junk ------------------------------------- You've achieved success in your field when you don't know whether what you're doing is work or play On 5/1/07, Abel Braaksma <abel.online@xxxxxxxxx> wrote: Dimitre Novatchev wrote: > As I am an absolute RegEx beginner, please excuse me if this is a > trivial question.
|
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
|