Parsing big files

David Gould dg@REDACTED
Wed Dec 6 22:28:31 CET 2000

On Wed, Dec 06, 2000 at 10:49:47AM +0100, Robert Virding wrote:
> So far the builtin scanning modules cannot handle binaries.

I would really really like to see something like a perlre compatible regex
module that handled binaries. See python for what this could look like in
terms of api and results. My idea is to be able to say stuff like:

words(B) ->
    re:split(" ", B).   %% returns a list of binaries each being a text word.

{Prefix, Matches, Rest} = re:match("(\w+)\s+=\s+(\w+)",Input) %% works on bins

I realize it is not part of Erlangs true mission, but if this was a native
code module or somesuch, Erlang could be be used in certain apps where perl
would be the default choice.


David Gould                                                 dg@REDACTED
SuSE, Inc.,  580 2cd St. #210,  Oakland, CA 94607          510.628.3380
"As I've gained more experience with Perl it strikes me that it
 resembles Lisp in many ways, albeit Lisp as channeled by an awk
 script on acid."  -- Tim Moore <moore@REDACTED>,
                      on comp.lang.lisp

More information about the erlang-questions mailing list