You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Aldrian Obaja (JIRA)" <de...@uima.apache.org> on 2014/03/20 04:18:42 UTC
[jira] [Created] (UIMA-3687) RegexAnnotator variable value cannot
contain $ sign
Aldrian Obaja created UIMA-3687:
-----------------------------------
Summary: RegexAnnotator variable value cannot contain $ sign
Key: UIMA-3687
URL: https://issues.apache.org/jira/browse/UIMA-3687
Project: UIMA
Issue Type: Bug
Components: Sandbox-RegexAnnotator
Affects Versions: 2.3.1SDK
Environment: Mac OS 10.9.2
Reporter: Aldrian Obaja
Regex Annotator cannot replace variables which value contain $.
Caused by: java.lang.IllegalArgumentException: Illegal group reference
at java.util.regex.Matcher.appendReplacement(Matcher.java:808)
at java.util.regex.Matcher.replaceAll(Matcher.java:906)
at java.lang.String.replaceAll(String.java:2162)
at org.apache.uima.annotator.regex.impl.Rule_impl.replaceRegexVariables(Rule_impl.java:371)
at org.apache.uima.annotator.regex.impl.Rule_impl.initialize(Rule_impl.java:285)
Sample variable:
<variable name="dollar" value="US\$|USD" />
Caused by the code escaping backslashes without escaping dollar sign in ConceptFileParser_impl.java:103 and then later used directly as replacement value in Rule_impl.java:371, causing the dollar sign to be interpreted as start of group reference, hence the "Illegal group reference" error.
--
This message was sent by Atlassian JIRA
(v6.2#6252)