fixed bug in PCRE and simple search. Passes tests now