[Linux-disciples] Negative lookahead assertion
Stephen R Laniel
steve at laniels.org
Fri Jul 22 13:26:20 EDT 2005
I want to find every find within my blog that contains a
<blockquote> without a <p> immediately after, and replace it
with <blockquote><p>. So (with some edge cases taken out for
simplicity) I thought I should be able to use this Perl
command:
s{<blockquote(?!<p>)}{<blockquote><p>}g
using the 'negative lookahead' operator that Adam and Ken
have mentioned on here before. But it's not working. Instead
it seems to be *erasing* everything after the <blockquote>.
Should I be doing something differently here?
--
Stephen R. Laniel
steve at laniels.org
+(617) 308-5571
http://laniels.org/
PGP key: http://laniels.org/slaniel.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20050722/44fa3bb2/attachment.pgp
More information about the Linux-disciples
mailing list