Bug 724196 (BRMS-139) - regexp in DSL not working
Summary: regexp in DSL not working
Keywords:
Status: VERIFIED
Alias: BRMS-139
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRM (Guvnor)
Version: 5.0.0 GA
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: BRMS 5.3.0.GA
Assignee: manstis
QA Contact: Jiri Locker
URL: http://jira.jboss.org/jira/browse/BRM...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-06-10 16:51 UTC by Jaroslaw Kijanowski
Modified: 2012-06-15 00:55 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
When using the guided editor to enter a regular expression that included curly braces in a DSL sentence, the expression was incorrectly parsed with the first closing curly brace in the regular expression incorrectly recognized as the closing brace for the variable definition. The issue has been resolved and the curly braces used in regular expressions are recognized correctly.
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker BRMS-139 0 Major Closed regexp in DSL not working 2014-01-27 10:34:16 UTC

Description Jaroslaw Kijanowski 2009-06-10 16:51:49 UTC
securitylevel_name: Public

Comment 1 Jaroslaw Kijanowski 2009-06-10 16:52:07 UTC
Link: Added: This issue depends GUVNOR-365


Comment 2 Anne-Louise Tangring 2011-09-13 17:47:23 UTC
The guvnor-365 is completed and will be in Drools 5.3.

Comment 3 manstis 2011-10-18 11:02:01 UTC
This was fixed for GUVNOR-365

Comment 4 Jiri Locker 2011-11-14 20:14:44 UTC
One more thing to be fixed -- displaying the sentence in the Condition (LHS) dialog in Guided editor. Consider this DSL entry:

> [when][]When a person exists with social security number {chooseSSN:\d{3}-\d{2}-\d{4}} = Person(ssn == "{chooseSSN}")

Label for this sentence looks as following:

> When a person exists with social security number chooseSSN-\d2-\d4

Obviously the first right brace '}' in the regex is incorrectly recongnized as a closing brace of the variable definition and the rest of the regex is displayed.

Comment 5 manstis 2011-11-22 21:43:13 UTC
OK, fixed and back-ported to 5.3.x branch. 

I did take the liberty of making the text appear as below, so DSL parameters are more clear (especially in DSL sentences with multiple parameters). Let me know if you want the braces removed - it seemed a good idea to me:-

> [when][]When a person exists with social security number {chooseSSN:\d{3}-\d{2}-\d{4}} who is {gender} = Person(ssn == "{chooseSSN}", gender == "{gender})

Label for this sentence looks as following:

> When a person exists with social security number {chooseSSN} who is {gender}

Comment 6 Jiri Locker 2011-12-16 15:49:32 UTC
Verified in BRMS 5.3.0.DEV6.

Comment 8 lcarlon 2012-05-31 05:35:45 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
When using the guided editor to enter a regular expression that included curly braces in a DSL sentence, the expression was incorrectly parsed with the first closing curly brace in the regular expression was incorrectly recognized as the closing brace for the variable definition.

Comment 9 lcarlon 2012-05-31 05:37:12 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-When using the guided editor to enter a regular expression that included curly braces in a DSL sentence, the expression was incorrectly parsed with the first closing curly brace in the regular expression was incorrectly recognized as the closing brace for the variable definition.+When using the guided editor to enter a regular expression that included curly braces in a DSL sentence, the expression was incorrectly parsed with the first closing curly brace in the regular expression was incorrectly recognized as the closing brace for the variable definition. The issue has been resolved and the curly braces used in regular expressions are recognized correctly.

Comment 10 lcarlon 2012-06-15 00:55:12 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-When using the guided editor to enter a regular expression that included curly braces in a DSL sentence, the expression was incorrectly parsed with the first closing curly brace in the regular expression was incorrectly recognized as the closing brace for the variable definition. The issue has been resolved and the curly braces used in regular expressions are recognized correctly.+When using the guided editor to enter a regular expression that included curly braces in a DSL sentence, the expression was incorrectly parsed with the first closing curly brace in the regular expression incorrectly recognized as the closing brace for the variable definition. The issue has been resolved and the curly braces used in regular expressions are recognized correctly.


Note You need to log in before you can comment on or make changes to this bug.