I've read that.. I understand I'm not a perl master, but if you know the solution, please, tell me where I'm not right..
$x = "<tr><td>1</td><td>2</td><td><font>3</font></td><td>4</td><tr>";
$x =~ s{<td>(?!<td>)3(?!</td>)</td>}{<td>($1)a($2)</td>};
print $x;
It does not work... are there any ideas?
Update
deep posts does not appear for some reasons.. I'll post again in the top-level:
you see, I met such problem not with html only... this is a general question. I'm pretty sure there must exist some regex to solve the problem, but my knowledge is too small. But, nevertheless, thanks)
Maybe, someone other knows any regex solutions? | [reply] [d/l] |
are there any ideas?
Yes, consider abandoning a regex approach, and select an appropriate CPAN solution for parsing HTML. I have used
HTML::TokeParser, although I am not experienced enough with it to know if it will solve your problem.
| [reply] |
you see, I met such problem not with html only... this is a general question. I'm pretty sure there must exist some regex to solve the problem, but my knowledge is too small. But, nevertheless, thanks)
Maybe, someone other knows any regex solutions?
| [reply] |
deep posts does not appear for some reasons.. I'll post again in the top-level:
I personally believe you should go to your User Settings and avoid to "post again in the top-level" - that is not going to earn you anything. It's a matter of visualization anyway. Personally, I've set both Replies header depth and Replies text depth to 1000: but IIRC, with lower values you still get a pointer to deeper posts.
| [reply] [d/l] |