How to write this regular expression? Answers from experts! The code in a webpage is as follows: & lt; span & nbsp; class = "1" & gt; & nbsp; & lt; h3 & nbsp; class = "title" & gt; how to write a regular expression like testtesttestte? Answers from experts!
The code in a webpage is as follows:
testtesttesttesttesttestt
testtesttesttesttesttesttesttesttesttesttesttest
testtesttesttesttesttestt
testtesttesttesttesttesttesttesttesttesttesttest
testtesttesttesttesttestt
testtesttesttesttesttesttesttesttesttesttesttest
testtesttesttesttesttestt
testtesttesttesttesttesttesttesttesttesttesttest
...
We noticed that no class = "1", class = "2", class = "3 ",... it is regular, but the previous labels are not regular, sometimes span, and sometimes div. what I want is to use php to write regular expressions to get class = "1 ", class = "2", class = "3 ",... the regular expression is hard to learn. I have tried it for half a day and cannot write it out! Share: More