in reply to Online GREP problem

Ignore this post. I found that my code did work, and a line about 50 lines away was causing the problem. thanks for all help.