in reply to Regex is possible but I prefer a hash.
in thread Need Set-like Regex for Perl and Java (golf OK)

The hash is a nice solution if the number and size of the ranges aren't to big, but it could consume a substantial amount of memory.

My "big string" method will be substantially slower, but it would use considerably less memory than a hash.

Also, Java's hash equivalent aren't nearly so convenient as perl's, but the big string would translate directly.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
  • Comment on Re: Regex is possible but I prefer a hash.