You are here: Re: two kinds of regular expression « PHP Programming Language « IT news, forums, messages
Re: two kinds of regular expression

Posted by John Dunlop on 12/18/79 11:48

Andy Jeffries:

> OK, so ignoring the latter part about referring to standards, why am I not
> correct?

I didn't say you weren't correct. I just don't see why saying that
you are correct helps.

> OK, considering the two main standards out there (PCRE and POSIX), both of
> them suggest literal hyphens should be quoted within metcharacter classes.

I don't know what you mean. The notation of POSIX regular
expressions does not suggest anything of the sort but actually *rules*
*out* backslashes as escape characters in character classes. The man
pages are quite explicit: backslashes lose their metacharacter
function there. The notation of PCREs does allow backslashes as escape
characters in character classes but also allows literal hyphens to
occur in certain positions unescaped. I don't see how it follows from
that that the notation used by either kind of regular expression, let
alone both, suggests that literal hyphens *should* be escaped.

--
Jock

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация