Reply to preg_match help please

Your name:

Reply:


Posted by Steve Turnbull on 09/08/05 10:21

Hi

I am trying to find a regular expression to match a variable, what I think
should work (but doesn't) is;

preg_match ('^/[\w],[\w],/', $variable)

The $variable MUST contain an alpha-numeric string, followed by a comma,
followed by another alpha-numeric string, followed by another comma
followed by (but doesn't have to!!) another alpha-numeric string followed
by nothing.

I realise my regex above doesn't allow for the last 'followed by nothing',
but to me it looks like it should match the first part of the string up to
the last comma?

Help appreciated, and apologies if this isn't strictly the correct group.

Thanks
Steve

[Back to original 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

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