Re: Re: Another RegEx Question

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

 



On Mon, 2010-06-07 at 13:18 -0300, Jo?o C?ndido de Souza Neto wrote:

> May be this:
> 
> /.*?[(@#$%].*/
> 
> "Floyd Resler" <fresler@xxxxxxxxxxxxx> escreveu na mensagem 
> news:3C7C9EE4-786E-4447-859E-AD055635986D@xxxxxxxxxxxxxxxx
> I need to test for the existence of at least one punctuation (@#$%') 
> character in a string.  What would my regular expression be?
> 
> Thanks!
> Floyd
> 
> 
> 


You don't need the . character there to match anything. Also, ( and $
have a special meaning in regex, so should be escaped to avoid any
confusion or problems.

Thanks,
Ash
http://www.ashleysheridan.co.uk



[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