You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Marshall Schor (JIRA)" <de...@uima.apache.org> on 2014/04/11 17:44:15 UTC

[jira] [Updated] (UIMA-3687) RegexAnnotator variable value cannot contain $ sign

     [ https://issues.apache.org/jira/browse/UIMA-3687?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marshall Schor updated UIMA-3687:
---------------------------------

    Affects Version/s:     (was: 2.3.1SDK)
                       2.3.1Addons

> 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.1Addons
>         Environment: Eclipse Kepler on Mac OS 10.9.2 running Java 7
>            Reporter: Aldrian Obaja
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> 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)