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.
In reply to Re: Regex is possible but I prefer a hash.
by BrowserUk
in thread Need Set-like Regex for Perl and Java (golf OK)
by QM
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |