Re: String searching
| From: | Richard Heyes | Date: | Sat, 17 May 2008 10:17:29 +0000 |
| Subject: | Re: String searching | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-274465@lists.php.net to get a copy of this message | ||
Chris W wrote:
I need to find the position of the first character in the string (searching from the end) that is not one of the characters in a set. In this case the set is [0-9a-zA-z-_] I guess to be even more specific, I want to split a string into to parts the first part can contain anything and the second part must be only in the set described above. What is the easiest way to do this?There's something here, imaginatively called blah(), which does what you require: http://www.phpguru.org/preg/example.phps -- Richard Heyes +----------------------------------------+ | Access SSH with a Windows mapped drive | | http://www.phpguru.org/sftpdrive | +----------------------------------------+