fix #11: removed the "g" (global) flag for the RegExp instance creation. This flag is not actually needed (we just need to test any occurrence), while it also seem to avoid the weird behaviour described in this issue.