Ask a regular formula to intercept the string:
For example, in a piece of text I want to get this text (not including double quotes): "As of 2013-09-30, this is some text, this is some text." ”
How do you write with regular? I want to match "up to 2013-09-30 xxxxxxx." ”
Reply to discussion (solution)
XXXX refers to what, exactly match to where
Preg_match_all (' ~ Up to (. *?). ~ '), and find the start and end tags just fine.
XXXX refers to what, exactly match to where
XXXX is omitted
For example "This is a text,,,,,,, as of 2013-09-30, I have reached 1 million hits. This is a piece of text ... "I'm going to take it out." As of 2013-09-30, I reached 1 million hits. "This Part
$s = ' This is a text,,,,,,, I have reached 1 million hits by 2013-09-30. This is a piece of text ... ' Preg_match ('/up (. +?). /', $s, $m); Echo $m [0];
$s = ' This is a text,,,,,,, I have reached 1 million hits by 2013-09-30. This is a piece of text ... ' Preg_match ('/up (. +?). /', $s, $m); Echo $m [0];
Thank you so much!