A
A
afiskon2011-07-21 04:35:12
Perl
afiskon, 2011-07-21 04:35:12

Is it possible to do the equivalent of (aaa)(?:bbb|qqq)(ccc) in POSIX regular expressions?

Well, that is, so that only aaa and ccc get into match for such an expression? In Perl regular expressions, this works fine, with POSIX it doesn’t work, although it seems that I even set the Extended flag. Do they even support something like this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kronius, 2011-07-21
@Kronius

As far as I understood, the original string of the form
aaabbbcccor aaaqqqccc
Other should not be accepted.
It will also repeat the POSIX expression exactly like
(aaa)[b|q]{3}(ccc)
it, by the way, it can also be used in PERL expressions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question