I'm pretty bad in regexp and I would really appreciate your advice.
I have string in JavaScript containing two links with the white space in between.
So basically every time this occurs </a> <a
to change it into </a><a
.
Thank you!
I'm pretty bad in regexp and I would really appreciate your advice.
I have string in JavaScript containing two links with the white space in between.
So basically every time this occurs </a> <a
to change it into </a><a
.
Thank you!
Use:
var newstring = mystring.replace(/<\/a>\s+<a/g, "</a><a");
Could be something like this:
find /<\/a>[\s\r\n]+<a/g
replace "</a><a"
Try
string = string.replace("</a> <a","</a><a")
or
string = string.replace(/<\/a>\s+<a/g,"</a><a")
to replace also multiple spaces, tabs etc.