javascript regular expression followed by open square bracket
Posted
by John Adawan
on Stack Overflow
See other posts from Stack Overflow
or by John Adawan
Published on 2010-04-09T05:35:16Z
Indexed on
2010/04/09
6:03 UTC
Read the original article
Hit count: 276
text = text.replace(/\.(?=[a-zA-Z0-9\[])/g, "<span style='background-color: #FF00FF'>.</span>");
I want to use javascript to highlight all full stops that is followed by letters, numbers and [. The above expression works for letters and numbers, but not bracket. Any idea what's wrong?
© Stack Overflow or respective owner