M
Matt Garrish
So what your saying is that after the first substitution in global context
s///g, the char position pointer has no notion of beggining of line?
Well, I think it could be written that /^/ is still valid after every
substitution.
Or are you saying the documentation says /^/ is *ONLY* valid before the
*FIRST* substitution in global context?
Why do keep writing gibberish?
What you fail to understand in this case is that the string position is not
the issue; you'd also have to tell the regex engine to drop the string it
was operating on and instead use the just-modified string. I'd love to see
you write any kind of meaningful regular expression when you have to
consider what the string will look like after every substitution, knowing
that what you just substituted in may get operated on again.
But then, that's why you're not a very good programmer...
Matt