xsl-list
[Top] [All Lists]

Re: [xsl] Implementation Advice: Grouping Strings by Character Range in XSLT 2

2016-04-29 14:30:01
On 29.04.2016 20:38, Eliot Kimber ekimber(_at_)contrext(_dot_)com wrote:
I have my generated analyze-text approach working generally. However, some
of my regular expressions are not matching when I would expect them to.

For example, given this @regex value:


regex="'([©®℠™]+)|([¦²³¹¼&
#xbd;¾Ð×ÝÞðýþŠš∂
∏∑−∫≠≤≥]+)|([➤]+)'"


And this text:

"©®"

The regular expression does not match, even though the first group clearly
matches on \uA9 and \uAE.

Have I made a stupid syntax mistake in my regular expression? Is there
some subtlety to matching groups that makes XSLT different from what
Oxygen is doing? I can't see any obvious syntax error in the regular
expression.

The problem is the single quote you have wrapped the regular expression
into, the regex attribute is not an XPath expression, if you wanted that
you would need to use an attribute value template. So I suppose you
simply want

regex="([©®℠™]+)|([¦²³¹¼&
#xbd;¾Ð×ÝÞðýþŠš∂
∏∑−∫≠≤≥]+)|([➤]+)"


---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>