следующее регулярное выражение неверно - может кто-нибудь, пожалуйста, помочь найти все :-), которые не имеют "пожалуйста, игнорируйте меня" впереди?
Раньше я не нуждался в таком регулярном выражении. Границы слова могут запутать вещи.
Спасибо
<script type="text/javascript">
function regexTest(string, assert) {
document.write('<hr>')
document.write(string)
document.write("[")
document.write(string.match(/\b((?!please ignore me )\:\-\))\b/gi)!=null);
document.write("]?" + assert);
}
regexTest("1. this is the first string :-) ",true);
regexTest("2. :-)",true)
regexTest("3. another string:-)here",true);
regexTest("4. Ending a sentence with :-)",true);
regexTest("5. please ignore me :-)",false);
</script>