>>>>> "JB" == John Burgess <> writes:
JB> Seems I really was off the track a bit. I am no regexp pro. I'm
JB> trying though. Your example does indeed work. Your comment about
JB> speed is interesting. Part of the reason for finding the correct
JB> match regexp was to test for speed, which I will still test. The
JB> other thing is I want to use this in a grep and I'm not sure the
JB> tr can be used economically in this context? Thanks for your
JB> help. I'll be sure and go over where you say I've got it
JB> wrong. Your comments make a lot of sense.
please stop top posting. read the frequently posted group guidelines for
more about that.
what does 'used economically in this context' mean? what context? why
are you so speed conscious about this? have you found it to be a major
bottleneck and you need more speed? and tr/// isn't a regex so don't
confuse it with them. and tr/// *IS* the fastest way to count chars in a
string. there is no way a regex can beat it for something as simple as
that. tr/// is designed for character oriented operations.
uri
--
Uri Guttman ------
--------
http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ----------------------------
http://jobs.perl.org