I need to clean up some text.
- I need to remove all instances where < occurs as first and only char on a line (but keep the line empty):
eg
the cat sat on the mat
>
the dog sat on the cat
- I also need to remove instances where we have uncessary < followed by a space and then a <b> (first char on line)
eg
< <b>The cat sat on the mat
and finally I need to make sure that each line that only contains <b>...any text in here...</b> has one empty line above it (except for the first occurence in the whole string being processed)
Anyone able to help put this into a regex?



Reply With Quote


Bookmarks