I'm fairly new to regular expressions but I'm trying to create one which will
make keywords in a string bold on a web page. To identify the keywords in the
string I'm using the following Regular Expression, which mostly works, unless
there is a <br> directly before or after the keyword. If there is a <br>
directly before or after, the word before or after the <br> is also shown
bold.
"(\s{0,1}\S*(" + keywordArray(jLoop) + ")\S*\s{0,1})"
description = regEx.Replace(description, "<b>$1</b>")
I'm trying to match any words which contain the keyword, not just equal the
keyword.
Can anyone help? Thanks,
Carolyn