Subject: Re: [xsl] analyze-string help? From: Michael Kay <mike@xxxxxxxxxxxx> Date: Sun, 10 Jun 2012 09:45:58 +0100 |
I think this principle of always using the simplest regex that does the job is a very good one. Remember, even if the regex works on all your test cases, there's a good chance someone in a year's time is going to come back to it and need to change it. Complex regexes are intrinsically very hard to debug, so it's a good idea to avoid them if you can.But is there any reason not to use a simpler regex? E.g., <xsl:analyze-string select="normalize-space($title)" regex="(.+) - (.+)">
Even if it doesn't fix your problem, it might make it easier to find.
separate the content after the last "space dash space"
Michael Kay Saxonica
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] analyze-string help?, Syd Bauman | Thread | Re: [xsl] analyze-string help?, Wolfgang Laun |
Re: [xsl] analyze-string help?, Wolfgang Laun | Date | Re: [xsl] analyze-string help?, Wolfgang Laun |
Month |