[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Why no PCRE for Windows?
From: |
John Cowan |
Subject: |
Re: [Chicken-users] Why no PCRE for Windows? |
Date: |
Sun, 9 Jul 2006 13:42:44 -0400 |
User-agent: |
Mutt/1.3.28i |
Kon Lovett scripsit:
> > PCRE_CASELESS 1 ; treat uppercase like lowercase
> > PCRE_MULTILINE 2 ; limit search at a newline like Perl's /m
> > PCRE_DOTALL 4 ; . (dot) also matches newline
> > PCRE_EXTENDED 8 ; ignore whitespace except inside char class
> > PCRE_ANCHORED 16 ; anchor at the start
> > PCRE_DOLLAR_ENDONLY 32 ; $ matches at end of string, not before
> >newline
> > PCRE_EXTRA 64 ; additional functionality currently not used
> > PCRE_NOTBOL 128 ; first char not start of line, ^
> >shouldn't match
> > PCRE_NOTEOL 256 ; last char not end of line, $ shouldn't
> >match
> > PCRE_UNGREEDY 512 ; invert greediness of quantifiers
> > PCRE_NOTEMPTY 1024 ; empty string considered invalid
> > PCRE_UTF8 2048 ; pattern and strings as UTF-8 characters
Some of these things can be triggered by "(?x)" at the start of the regex,
where x is a lowercase letter. In particular, "(?i)" forces case-blind
matching, "(?s)" forces dot to match newline, "(?x)" forces whitespace
to be ignored, and "(?m)" forces ^ and $ to match around newlines,
not just at the beginning/end of the string. (\A and \Z match the
beginning and end of string respectively independent of this flag,
so you can get the effect of PCRE_ANCHORED by wrapping your pattern
with them.)
--
John Cowan http://ccil.org/~cowan address@hidden
[T]here is a Darwinian explanation for the refusal to accept Darwin.
Given the very pessimistic conclusions about moral purpose to which his
theory drives us, and given the importance of a sense of moral purpose
in helping us cope with life, a refusal to believe Darwin's theory may
have important survival value. --Ian Johnston