diff options
author | Yves Orton <demerphq@gmail.com> | 2007-01-09 01:46:31 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-01-09 10:04:37 +0000 |
commit | e357fc671749d483a102a060a774d41a9b256b46 (patch) | |
tree | ad6b6dd8c8d0407474c2ac0da73f6ccbcbcfdb47 /regcomp.c | |
parent | 850d607338c285d0f6a7d66f1c4baf08de921004 (diff) | |
download | perl-e357fc671749d483a102a060a774d41a9b256b46.tar.gz |
Let the regex parser decide if we have a special pattern or not.
Message-ID: <9b18b3110701081546n2c3f19acy29adc0d233bb848c@mail.gmail.com>
p4raw-id: //depot/perl@29730
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -4582,6 +4582,11 @@ reStudy: r->paren_names = (HV*)SvREFCNT_inc(RExC_paren_names); else r->paren_names = NULL; + if (r->prelen == 3 && strEQ("\\s+", r->precomp)) + r->extflags |= RXf_WHITE; + else if (r->prelen == 1 && r->precomp[0] == '^') + r->extflags |= RXf_START_ONLY; + #ifdef DEBUGGING if (RExC_paren_names) { ri->name_list_idx = add_data( pRExC_state, 1, "p" ); |