in reply to Re: Why would one want in a regex a class with only a single entry?
in thread Why would one want in a regex a class with only a single entry?
Thanks, those both make sense...especially the second one. I don't use the /x modifier much (though as I'm learning, it really helps me remember why I constructed regex's a particular way after I've been away from it for a while) so that one I completely missed.
I'm curious about the first case, though. Given what I've been led to believe are the penalities of using classes, why wouldn't one check the variable to see if it has just one entry and cast it differently...i.e., in a more regex-engine-efficient form?
Just curious.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Why would one want in a regex a class with only a single entry?
by ysth (Canon) on Mar 26, 2008 at 03:49 UTC | |
by ack (Deacon) on Mar 27, 2008 at 05:53 UTC |