Re: RegEx question

From: Date: Wed, 03 Jul 2002 13:22:43 +0000
Subject: Re: RegEx question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-105170@lists.php.net to get a copy of this message
"Richard Lynch" <rich@phpbootcamp.com> wrote in message... > > How can I regex to compare the last three chars of a string to "php"? > > if (substr($foo, -3) == 'php'){ > } > > Oh, wait, you wanted to use RegEx. Sorry, can't help you there. :-) > > Don't use a cannon to swat a fly. probably a good call.. :) -- ======================================================================= Michael J. Ryan - tracker1[*at*]theroughnecks.com Roughneck BBS: http://www.theroughnecks.net telnet://theroughnecks.net ======================================================================= Y!: aztracker1 - aim: azTracker1 - icq: 4935386 - msn: see email One program for aim/icq/yahoo/msn/irc - http://www.trillian.cc/

« previous php.general (#105170) next »