Refinement to regex search, still needs tweaking