Thanks for all the help. I got it working with some modifications to the code to not use a pubm and used a regular bind pub and still used the split text that Nimos provided.
I decided against the regexp method because of overlapping binds using pubm unless there is something i missed to stop this