General questions about using TextPad
Moderators: AmigoJack , bbadmin , helios , MudGuard
Rikardov
Posts: 2 Joined: Sun Oct 31, 2010 9:57 pm
Post
by Rikardov » Sun Oct 31, 2010 10:15 pm
Hi, I hope you can help me with this, I'm having a hard time doing it as I'm new to regular expressions
I have thousands of these lines, each with a different file name of course.
Code: Select all
<image imageURL="images/FILENAMEXX.jpg" thumbURL="thumbs/FILENAMEXX.jpg"
linkURL="" linkTarget="" >
And I need them to look like this:
Code: Select all
<image>
<filename>FILENAMEXX.jpg</filename>
I've tried everything and read a lot about regular expression but I'm nowhere near the result I need, I really hope you can help me with it, thank you very much.
ak47wong
Posts: 703 Joined: Tue Aug 12, 2003 9:37 am
Location: Sydney, Australia
Post
by ak47wong » Sun Oct 31, 2010 11:05 pm
Find what: <image imageURL="images/([^"]*).*
Replace with: <image>\n___<filename>\1</filename> (replace 3 underscores with 3 spaces)
This assumes you have POSIX regular expression syntax enabled in Configure->Preferences->Editor.