Conditional Regular Expressions in ORO

I

Ion Freeman

Hello!
I'm trying to match 'b' or 'abc' -- so, a simple '(a)?b(?(1)c)' should
do it. Now, the java.util.regex classes don't do it, so I'm trying
ORO. However, ORO gives me

Sequence (?(...) not recognized

So... does anybody know if ORO does not support this as well? Is there
a Java library out there that does?
 
M

markspace

Ion said:
Hello!
I'm trying to match 'b' or 'abc' -- so, a simple '(a)?b(?(1)c)' should
do it. Now, the java.util.regex classes don't do it,


This is funny, because I'm just playing around with the little Java
regex tester I built.

Match b or abc: b|abc

OK, that was easy. How about: a?bc?

Both work for me. Are you sure you checked this correctly? Because
your pattern gives me an exception. How about posting an SSCCE?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top