[
https://issues.jboss.org/browse/JBRULES-2992?page=com.atlassian.jira.plug...
]
Edson Tirelli resolved JBRULES-2992.
------------------------------------
Resolution: Rejected
Thomas, the use of single escapes for regex was deprecated in 5.0 and maintained just for
backward compatibility with 4.x during 2 years. With the parser rewrite in 5.2, we thought
it was time to remove that and handle escapes the 5.x way (i.e., like in java) with double
escapes.
I am closing this ticket, but if there is a reason to still support single escapes for
regex, feel free to reopen this ticket and let us know and we might consider
reimplementing the processStringScapes.
Could not parse escaped characters
----------------------------------
Key: JBRULES-2992
URL:
https://issues.jboss.org/browse/JBRULES-2992
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 5.2.0.M2
Reporter: Tomáš Schlosser
Assignee: Edson Tirelli
Fix For: 5.3.0.Beta1
When trying to parse rule:
rule "Regex-A"
when
Person(name matches "\w\w\d{3}\w\w")
then
insert(new Message("Regex-A working"));
end
I get following exception:
Unable to Analyse Expression name ~= "\w\w\d{3}\w\w": [Error: illegal escape
sequence: w] [Near : {... name ~= "\w\w\d{3}\w\w" ....}] ^ [Line: 1, Column: 22]
: [Rule name='Regex-A']
use of KnowledgeBuilder property 'drools.parser.processStringEscapes' seems to
have no effect. Worked in 5.1
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira