in reply to Re^5: Regex infinite loop?
in thread Regex infinite loop?
I'm hoping you can help me understand a couple of things. First, I thought that if I used the "?" I got non-greedy searching. Shouldn't that be helping things out?
Also, I'm trying to understand the code that you have suggested. Within the capturing parentheses you have [^"]++. What does this mean exactly? I read it as match anything that's not a double quote. I'm sure that I am wrong. Also, I don't know what the ++ does. I have only ever used one + to indicate "match at least once". What does the double plus, ++, mean? How would I say (in English) what is going on with [^"]++?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Regex infinite loop?
by JavaFan (Canon) on Oct 17, 2008 at 15:58 UTC | |
by Ninth Prince (Acolyte) on Oct 17, 2008 at 16:09 UTC | |
by Ninth Prince (Acolyte) on Oct 17, 2008 at 17:03 UTC |