[pcre-dev] [Bug 1336] Universal Character Name escape code

Pàgina inicial
Delete this message
Autor: Zoltan Herczeg
Data:  
A: pcre-dev
Assumpte: [pcre-dev] [Bug 1336] Universal Character Name escape code
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1336

Zoltan Herczeg <hzmester@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hzmester@???





--- Comment #1 from Zoltan Herczeg <hzmester@???> 2013-02-13 07:48:25 ---
Since PCRE aims for Perl compatibility, I would not introduce new sequences.
This may lead to incompatibility if Perl introduce a different escape sequence
using the very same name.

However, you can use recursions for such task:
/(?(DEFINE) ([a-z][a-z0-9]+) )(?1),(?1)/

This pattern search two identifiers separated by a comma. You don't need to
repeat the pattern for the identifier, it is represented by (?1), since it is
the first capturing bracket. I am not sure you can use descriptive names
here...

You can also use /([a-z][a-z0-9]+),(?1)/ in this special case, but I also
wanted to show you the (DEFINE) conditional block as well.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email