Acquisition, with more than 1 results for regular expressions,
Expression Get result/
(.*?)
/I matches multiple strips out. That's all.
There is a question.
Get only the first one.
Or just get the last one.
How do you write this?
Get the first article that many people think will/
.*
- (.*?)
/Is there anything else besides this?
Reply to discussion (solution)
Match the first one
You can use Preg_match.
The last one can be used/
- (.*?) <\/li>\s*<\/ul>/
Match the first one
You can use Preg_match.
The last one can be used/
- (.*?) <\/li>\s*<\/ul>/
There are multiple (. *?) rules in the rule. , you need to return the array to do the processing.
For example
/
- ^2013-(. *?) (.*?)
/
In this case, do not need to start greedy mode U?
And also need Preg_match_all?
You're not going to get one, you can use Preg_match.
There are multiple (. *?) rules in the rule. , you need to return the array to do the processing.
Does this have an impact, for example to see.
Preg_match_all returns an array, you can choose which result to use
You're not going to get one, you can use Preg_match.
There are multiple (. *?) rules in the rule. , you need to return the array to do the processing.
Does this have an impact, for example to see.
Tested. As you have said. Returning to do arrays is not affected.
Preg_match_all returns an array, you can choose which result to use
In fact, Preg_match_all and Preg_match are the same. One is to match all the appropriate. One is to match a suitable one.
-