Unfortuantely /c is taken for /gc matches. My problem with "traditional" is that the term "traditional" is how I have been thinking of the /a variant, which makes things match the way perl did before it supported unicode. But maybe the difference is one is "Perl-traditional" and the other is "Perl-with-unicode-traditional". I dont know. Got any other ideas?
BTW you can see the ones that are taken below:
/* chars and strings used as regex pattern modifiers
* Singlular is a 'c'har, plural is a "string"
*
* NOTE, KEEPCOPY was originally 'k', but was changed to 'p' for prese
+rve
* for compatibility reasons with Regexp::Common which highjacked (?k:
+...)
* for its own uses. So 'k' is out as well.
*/
#define EXEC_PAT_MOD 'e'
#define KEEPCOPY_PAT_MOD 'p'
#define ONCE_PAT_MOD 'o'
#define GLOBAL_PAT_MOD 'g'
#define CONTINUE_PAT_MOD 'c'
#define MULTILINE_PAT_MOD 'm'
#define SINGLE_PAT_MOD 's'
#define IGNORE_PAT_MOD 'i'
#define XTENDED_PAT_MOD 'x'
#define BROKEN_SEM_PAT_MOD 'b'
#define LOCALE_SEM_PAT_MOD 'l'
#define PERL_SEM_PAT_MOD 'a'
#define UNI_SEM_PAT_MOD 'u'
#define ONCE_PAT_MODS "o"
#define KEEPCOPY_PAT_MODS "p"
#define EXEC_PAT_MODS "e"
#define LOOP_PAT_MODS "gc"
#define STD_PAT_MODS "msix"
#define SEM_PAT_MODS "blau"
#define INT_PAT_MODS STD_PAT_MODS KEEPCOPY_PAT_MODS
#define EXT_PAT_MODS ONCE_PAT_MODS KEEPCOPY_PAT_MODS
#define QR_PAT_MODS STD_PAT_MODS EXT_PAT_MODS SEM_PAT_MODS
#define M_PAT_MODS QR_PAT_MODS LOOP_PAT_MODS
#define S_PAT_MODS M_PAT_MODS EXEC_PAT_MODS
---
$world=~s/war/peace/g
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|