I need to find a paragraph that contains a specific string in an html code section. For example, the test can find this paragraph. However, in php, the first p tag will be matched, instead of starting from the p Tag I need. Is it reasonable to say that I have already set this mode to non-Greedy mode? Why not?
I need to find a paragraph that contains a specific string in an html code section. For example, the test can find this paragraph.
However, in php, the first p tag will be matched, instead of starting from the p Tag I need. Is it reasonable to say that I have already set this mode to non-Greedy mode? Why not?
Reply content:
I need to find a paragraph that contains a specific string in an html code section. For example, the test can find this paragraph.
However, in php, the first p tag will be matched, instead of starting from the p Tag I need. Is it reasonable to say that I have already set this mode to non-Greedy mode? Why not?
Result of Line Break replacement:
Result of replacement without line breaks:
Send your PHP code and initially suspect that the strings in your code do not have line breaks.