Bug: can only use replacement pattern once

0 views
Skip to first unread message

Duncan Smart

unread,
Aug 16, 2007, 6:01:14 AM8/16/07
to World's Simplest Code Generator
Had a bunch of URLs that I wanted to generate <a href="zzz">zzz<a>
tags from, but this pattern:

<a href="$1">$1</a>

resulted in:

<a href="http://www.example.com/abc">$1</a>
<a href="http://www.example.com/def">$1</a>
etc...

Expected result:
<a href="http://www.example.com/abc">http://www.example.com/abc</a>
<a href="http://www.example.com/def">http://www.example.com/def</a>

secretGeek

unread,
Aug 16, 2007, 6:58:06 PM8/16/07
to World's Simplest Code Generator
Doh!

Fixed now Duncan.

Updated the article too.

Reply all
Reply to author
Forward
0 new messages