Re: Regular expressions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is there a way to make a regular expression to match on a particular way
the letters are arranged?  For instance, if you had a word:

THAT


It could match on any word in the dictionary that had the form:

1231

preg_,match('/^(\w){1}\w\w\1$/');

would match the above on a single line for example, where \1 refers to the
pattern captured in parentheses at the start.

Try and be a little more specific in what you want to match, as regex is
hard enough to start with - a detailed and clear description will elicit
corresponding responses.

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux