Witam
Chciałbym sie dowiedzieć czy istnieje możliwość przeszukania tekstu wyrażeniem regularnym, a w wyniku dostać nie wyrażenie, a numer znaku w stringu, od ktorego zaczyna sie szukany tekst. Czyli taki strpos tylko z regexpem?
Witam
Chciałbym sie dowiedzieć czy istnieje możliwość przeszukania tekstu wyrażeniem regularnym, a w wyniku dostać nie wyrażenie, a numer znaku w stringu, od ktorego zaczyna sie szukany tekst. Czyli taki strpos tylko z regexpem?
manual napisał(a)
int preg_match ( string $pattern , string $subject [, array &$matches [, int $flags [, int $offset ]]] )
[...]
flagsflags can be the following flag: PREG_OFFSET_CAPTURE If this flag is passed, for every occurring match the appendant string offset will also be returned. Note that this changes the value of matches into an array where every element is an array consisting of the matched string at offset 0 and its string offset into subject at offset 1.