PHP strpos preg_match
Posted
by usurper
on Stack Overflow
See other posts from Stack Overflow
or by usurper
Published on 2010-06-16T08:15:58Z
Indexed on
2010/06/16
8:32 UTC
Read the original article
Hit count: 189
Hi,
I want to copy a substring of a string using PHP.
The regex for the first pattern is /\d\|\d\w0:/
The regex for the second pattern is: /\d\w\w\d+:\s-\s:/
Is it possible combining preg_match with strpos to get the exact positions from start to end and then copy it with
substr( $string, $firstPos,$secPos ) ?
© Stack Overflow or respective owner