Thread: Regex examples
View Single Post
Old 04-16-2014, 11:09 AM   #324
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,739
Karma: 24031403
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by gipsy View Post
Is there is any way to find the word "τον" between italics and replace it with "του"?
The following very simple regex will find one occurrence of "tov" at the beginning, at the end and in the middle of a string of text enclosed by <i></i> tags:

Find:<i>(.*?)τον(.*?)</i>
Replace:<i>\1του\2</i>

You'll, of course, have to run it multiple times to find multiple occurrences of "τον" enclosed by <i></i> tags.
Doitsu is offline   Reply With Quote