btw: i know that using regex is not the best idea in the world...
For example i have such input variants:
<p> </p>
or
<p> </p>
or
<p> </p>
and i want to check my input like: all except <p> with in every amount of them (0, 1 or 50)...
i wrote such expression:
/[^<p>(\s* \s*)*<\/p>]/ig
and seems that it works, but!
for example i have such input:
<p> t </p>
or
<p> tttt tttt</p>
and it is thinking, that it is equal to my regex...
not a good idea...
what i do wrong in my regex? or maybe there are some better ways of solving this?
Aucun commentaire:
Enregistrer un commentaire