![]() |
Regex Function: Italicize a list of words
I have a Saved search that will wrap a designated word in an <i> tag.
This is mainly used for styling ship names where the author has not done so (I'm particular)! However, doing this one by one seems inefficient to me so I am thinking that if I could create a list of the required words I could just run the function once and it would rattle off all the changes in one go. All I would have to do is compile the list of words and "Robert is your father's brother". Unfortunately, my skills with regex functions are, at best, terrible so any assistance would be much appreciated. FWIW my current Search is Code:
Find: (Designated String)(?!</i>)([^s(\w)]) |
(word1|word2|wordn)
The 'pipe' symbol separates the list :bulb: grab yourself a REGEX cheat sheet for tips (just remember we use PCRE, so not every thing woiks' that is on the sheet |
Thanks, had not thought of doing it that way with a saved search.
I was thinking more of the regex looking up a list (perhaps in another file) and using that but this will work. |
| All times are GMT -4. The time now is 06:57 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.