I am working on a huge complicated txt file. And I need to put some HTML tags before and after some numbers. But NOT all the numbers should be processed. Those numbers between "(" and ")" should not be tagged.
For example
I want to replace those numbers into a form finally with HTML tags as follow,
The text content could be anything (like letters, numbers or punctuation). If I simply replace " 1. " with "</br><b> 1. </b>"that will affect also that "number 1." in brackets ( 1. textC) and turn it into Text </br><b> 1. </b> textA 2. textB (</br><b> 1. </b>. textC 2.textD) 3. text E
And that's of course NOT I want it to be.
So, any solution to replace those numbers outside the brackets? Any help would be highly appreciated!
Besides I would like to ask another question, how to do an incremental replacing-operation automatically as many times as it may need? For example, if I do need to replace " 1." with "</br><b>1.</b>", then replace " 2." with "</br><b>2.</b>" and then replace " 3." with "</br><b>3.</b>" and so on and so forth until it increases to "#n." which "#n." doesn't exist in this file and I could not do the replace action any more. How to let UE do this kind of replacement automatically? Since manually making this replacment is tiresome.
And similarly, is it possible to let UE smartly in alphabetical order replace letter " a)" with "</br><b> a)</b>", then replace "b)" with "</br><b> b)</b>", and then replace letter "c)"with "</br><b> c)</b>" and so on and so forth, until it reaches to letter "n)" which "n)" doesn't exist and quit the replacement?
For example
Code: Select all
Text 1. textA 2. textB ( 1. textC 2. textD) 3. text E
Code: Select all
Text </br><b> 1. </b> textA </br><b> 2. </b> textB ( 1. textC 2. textD) </br><b> 3. </b> text E
And that's of course NOT I want it to be.
So, any solution to replace those numbers outside the brackets? Any help would be highly appreciated!
Besides I would like to ask another question, how to do an incremental replacing-operation automatically as many times as it may need? For example, if I do need to replace " 1." with "</br><b>1.</b>", then replace " 2." with "</br><b>2.</b>" and then replace " 3." with "</br><b>3.</b>" and so on and so forth until it increases to "#n." which "#n." doesn't exist in this file and I could not do the replace action any more. How to let UE do this kind of replacement automatically? Since manually making this replacment is tiresome.
And similarly, is it possible to let UE smartly in alphabetical order replace letter " a)" with "</br><b> a)</b>", then replace "b)" with "</br><b> b)</b>", and then replace letter "c)"with "</br><b> c)</b>" and so on and so forth, until it reaches to letter "n)" which "n)" doesn't exist and quit the replacement?