I have a body of text with newlines in it, and I would like to replace all instances of newlines that are not inside certain tags with <br />
s. The tags are [something][~something]
, where something
could be anything.
Sorry for not including what I have already tried, but I have no idea how to get a regex to match something not inside something else. Is that even possible?