View Single Post
Old 01-23-2011, 05:02 PM   #8
Archon
Zealot
Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!
 
Archon's Avatar
 
Posts: 110
Karma: 5176
Join Date: Dec 2010
Device: Mac OSX, iPad, iPod, & Nook
Hmm yeah I am not to that level just that quick.

I had a book that someone OCRd and it had replaced all the italics with _foo_.

I was quite pleased with myself for using:

Find
_(.+)_

and replacing with

\\i \1 \\i0

With some tweaking I was able to replace a couple hundred occurrences with spaces, commas and periods after the words.

Now the book is back closer to its original with italics in it.

Not bad for my first foray but I am sure I will learn how to search and replace with just one search instead of repeated with different variations.

For anyone interested Bare Bones software has a free program called Text Wrangler for Mac OSX that will do regular expressions search and replacing.
http://www.barebones.com/products/te.../download.html

I will keep at it though until I understand everything you typed.
Thanks for the help
Archon
Archon is offline   Reply With Quote