Re: [PHP] Preg_match() regex

2006-04-22 Thread Kevin Waterson
This one time, at band camp, Jeff [EMAIL PROTECTED] wrote:

 Hey all,
 
 Regex pattern question here.  I need to match on Foo-F00, Foo-foo,
 foo-Foo.  I know in perl you can use the /i to specify case
 insensitive matching.  Is there any such switch that can be used in
 preg_match() in PHP?

Yes, the same works in PCRE. so you can do
preg_match(/foo-foo/i, $string)

kevin


-- 
Democracy is two wolves and a lamb voting on what to have for lunch. 
Liberty is a well-armed lamb contesting the vote.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Preg_match() regex

2006-04-21 Thread Jeff
Hey all,

Regex pattern question here.  I need to match on Foo-F00, Foo-foo,
foo-Foo.  I know in perl you can use the /i to specify case
insensitive matching.  Is there any such switch that can be used in
preg_match() in PHP?

Thanks,

Jeff

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Preg_match() regex

2006-04-21 Thread Joe Henry
On Friday 21 April 2006 9:44 am, Jeff wrote:
 Regex pattern question here.  I need to match on Foo-F00, Foo-foo,
 foo-Foo.  I know in perl you can use the /i to specify case
 insensitive matching.  Is there any such switch that can be used in
 preg_match() in PHP?


http://us3.php.net/manual/en/reference.pcre.pattern.syntax.php
-- 
Joe Henry
www.celebrityaccess.com
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Preg_match() regex

2006-04-21 Thread Richard Lynch
On Fri, April 21, 2006 10:44 am, Jeff wrote:
 Regex pattern question here.  I need to match on Foo-F00, Foo-foo,
 foo-Foo.  I know in perl you can use the /i to specify case
 insensitive matching.  Is there any such switch that can be used in
 preg_match() in PHP?

If you go to the http://php.net/preg_match page, and then on the left
in the navigation you'll see an outline of subjects.

From any function in the manual, it's always a Good Idea to also read
the General Topic which is its parent in that outline.

If you do so, you will, almost-for-sure, soon find that there is an
entire page of the manual devoted to answering questions like this
one.

Hope that helps.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php