I am undertaking a conversion from an export of an odt file and wish to do a regular expression search and replace of strings of words individually italicised instead of the entire phrase.
I have
Code:
<i>something</i> <i>like</i> <i>this</i>
and want
<i>something like this</i>
I came up with this
Code:
<i>(.*)</i>\s<i>(.*)</i>\s
but at times it is too greedy, trapping
Code:
<i>something</i> <i>like</i> <i>this</i> blah blah. More words and then <i>another</i> <i>string</i> <i>in</i> <i>italics</i>
Any ideas would be most welcome for how to write the search string and not trap a large block in between phrases