Quote:
Originally Posted by ElMiko
"Match everything but this" is as simple a explanation as I can come up with.
|
Always helps to have test cases. There are always strange things that happen that were not expected. Either use some real examples that you ran into during your epubbing, or just some simple test cases such as I came up with!
Would also help save a little time by people who want to help, and make more accurate regexes.
Quote:
Originally Posted by ElMiko
PS - @Tex: as always i especially appreciate your breaking down your thought process and compartmentalizing the behavioral characteristics of your regex. Frankly, it's the other reason I posted my question: I've come to realize that whether or not I get the specific answer I'm looking for, I'll always come out of the thread knowing more about reg-ex than i did going into it.
|
Yes, always helps getting the breakdowns. Sometimes regexes can be so obscure, and learning which piece does what always helps.
I thought that \1 could only be used in the Replace, but in Serpentine's example I see it can be used in a Search as well.