Saturday, May 12, 2012

PERL Regexp Quote-Like Operators

Regexp ใน perl มีตัว Operators ดังนี้
qr/STRING/msixpodual

ความหมายก็คือ

    m Treat string as multiple lines.

s Treat string as single line. (Make . match a newline)

i Do case-insensitive pattern matching.

x Use extended regular expressions.

p When matching preserve a copy of the matched string so
that ${^PREMATCH}, ${^MATCH}, ${^POSTMATCH} will be defined.

o Compile pattern only once.

l Use the locale

u Use Unicode rules

a Use ASCII for \d, \s, \w; specifying two a's further restricts

/i matching so that no ASCII character will match a non-ASCII
one

d Use Unicode or native charset, as in 5.12 and earlier





ref : http://perldoc.perl.org/perlop.html#Regexp-Quote-Like-Operators

No comments:

Why You Don't LIKE My FaceBook Fanpage ?
×
blogger