in reply to What is the function that does the following..?

I think your regexp doesn't work with such strings, because you doesn't use any 'm' or 's' modifiers. If you wanna process string char by char, you can 'split' that string to array and work with this array.
  • Comment on Re: What is the function that does the following..?