\"and\")\" but this occurs several times in a body of text." />
开发者

How to get a substring throughout document knowing the markers?

I know the strings开发者_StackOverflow社区 in need lie between

"=t\">" and ")"

but this occurs several times in a body of text.

How can I extract between multiple instances of this occurence?

I have tried Explode, a variety of functions, preg_split, for 6 hours and only getting wrong results - Is it even possible?


Assuming your delimiters are =t\"> and ).

preg_match_all('/=t\\">([.\n]+?)\)/', $str, $matches);

var_dump($matches);

It sounds like you are trying to parse some HTML. Have you considered DOMDocument?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜