I have a regex that works well for PCRE to detect a certain word without any special characters ahead of it. For example detecting T4 would work well with (?!\\S)T4(?!\\S).<