View Single Post
Old 02-25-2011, 06:57 AM   #3
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Interesting problem. Are you familiar with regular expressions? If so, you could use the search & replace feature. I could see something along the lines of
Code:
(?s)(?P<number>\[\d+\])(?P<word>\w+:)(?P<text>.*?)(?P=number)(?P=word)
as search expression work, you could then replace that with
Code:
\g<number>\g<word>\g<text>\g<number>\g<word>
plus whatever linking markup you need inserted around the first number/word pair.

The caveat here is that this is just off the top of my head. This may work, or it may fail catastrophically
Manichean is offline   Reply With Quote