Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » Regular expression is failing in latest Jubula(Any changes from 1.1 to 1.2)
Regular expression is failing in latest Jubula [message #847693] Tue, 17 April 2012 15:06 Go to next message
Phil M. Fischer is currently offline Phil M. FischerFriend
Messages: 60
Registered: November 2010
Location: Germany
Member
Hi There

we used the Regular Expression "\\*?=TITLE" in one of our testcases. It worked fine. But now with Jubula 1.2 all regular Expressions using the questionmark seem to fail.

Entering a simple ".?=TITLE" is not possible whereas ".*=TITLE" or ".+=TITLE" is...

index.php/fa/7953/0/

Does someone have any clue?

Cheers

Phil
  • Attachment: REGEXPROB.PNG
    (Size: 20.13KB, Downloaded 379 times)
Re: Regular expression is failing in latest Jubula [message #847754 is a reply to message #847693] Tue, 17 April 2012 16:10 Go to previous messageGo to next message
Achim Loerke is currently offline Achim LoerkeFriend
Messages: 354
Registered: July 2009
Location: Braunschweig, Germany
Senior Member

Jubula 1.2 introduced functions as possible parameter values. The lead-in character for functions is the question mark.
To fix this problem you have to escape all question marks with backslashes.
Re: Regular expression is failing in latest Jubula [message #848622 is a reply to message #847754] Wed, 18 April 2012 12:22 Go to previous messageGo to next message
Phil M. Fischer is currently offline Phil M. FischerFriend
Messages: 60
Registered: November 2010
Location: Germany
Member
Right, i just tried it with "\\*\?=TITLE"... apparently it does not work and is still incorrect...
Re: Regular expression is failing in latest Jubula [message #848679 is a reply to message #848622] Wed, 18 April 2012 13:29 Go to previous messageGo to next message
Achim Loerke is currently offline Achim LoerkeFriend
Messages: 354
Registered: July 2009
Location: Braunschweig, Germany
Senior Member

What do you mean by "does not work" and "is still incorrect"?

Entering "\\*.\?=TITLE" (w/o the quotes) works for me.

If the match doesn't work please provide the expected and actual values from the test result or a detailed error description from the test run.

Thanks

Achim
Re: Regular expression is failing in latest Jubula [message #891929 is a reply to message #848679] Tue, 26 June 2012 15:38 Go to previous messageGo to next message
Amanda Mitchell is currently offline Amanda MitchellFriend
Messages: 7
Registered: May 2012
Junior Member
I am having a similar issue with the ? using Jubula version 1.2.0

I want my string to read: .*Chains?: =ChainNames , which is invalid. If I escape the question mark once .*Chains\?: =ChainNames when running a test I encounter a testing error that states "Invalid Character? after backslash in \?. I've attached a screenshot of the error message.

According to the Documentation, there is nothing to mention having to escape the ?, so I'm a bit confused.

Thanks your help.


  • Attachment: Capture3.PNG
    (Size: 35.43KB, Downloaded 78 times)
Re: Regular expression is failing in latest Jubula [message #892410 is a reply to message #891929] Thu, 28 June 2012 07:25 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1163
Registered: July 2009
Senior Member
Hi,

Were you reading the documentation via the Eclipse pages? If so, then that won't be valid for some of the features in the 1.2 version (although, as of yesterday with the Juno release, now you will be able to find all the documentation for things that were in the 1.2 standalone version as well).

If you're using regex, it could be the case that you have to enter two backslashes (one to escape it for Jubula, one for the regex).

HTH,
Alex

Re: Regular expression is failing in latest Jubula [message #892604 is a reply to message #892410] Thu, 28 June 2012 17:11 Go to previous messageGo to next message
Amanda Mitchell is currently offline Amanda MitchellFriend
Messages: 7
Registered: May 2012
Junior Member
I was reading the Documentation that I access through the Help in Jubula. A link to the most current help would be appreciated.

I am trying to use the ? in the proper form of a regex, as a 0 or 1 of the previous character s.

If I enter double escape the ? the text field that I am entering it in turns red and won't allow it. I've attached a screenshot to demonstrate what I mean.

Therefore:
No escape or double escape character results in red text field indicate a character that is not allowed.

Single escaped ? results in an error while running a test.

Which leads me to the conclusion that I cannot use a ? in a regular expression.
Re: Regular expression is failing in latest Jubula [message #893252 is a reply to message #892604] Tue, 03 July 2012 11:05 Go to previous message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1163
Registered: July 2009
Senior Member
Hi,

The simplest way to completely disable all meta-functions of characters is to use single quotes. I tested entering
Chain'?'
and got correct results.

It does seem a bit odd that \? is disallowed - we may have overlooked something here, and you should create a ticket for that.

Best regards,
Alex
Previous Topic:Execute External Command not working correctly
Next Topic:AssertException
Goto Forum:
  


Current Time: Wed Nov 26 09:25:55 GMT 2014

Powered by FUDForum. Page generated in 0.01912 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software