Alright, I’m pretty sure that I have the regular expression right here, I just want it to replace a string that looks something like this:
(Distance [0-9].[0-9] with the same thing, only with a new line before it.
So it might start looking like this
2. Depart Start on 32nd Ave (North) (Distance: 0.2)3. Turn LEFT (West) onto US-14 (Distance: 0.4)
Then end up looking like this:
2. Depart Start on 32nd Ave (North) (Distance: 0.2)3. Turn LEFT (West) onto US-14 (Distance: 0.4)
The following is the line of code that I’m using:
var result=test.replace(test.match(“
It returns null for the matches even though I know that they should be in there. Must be something with the reg exp, but I can’t figure it out.
Thanks in advance,
Aaron