[erlang-questions] re2

Анна Мухаррам amuhar3@REDACTED
Wed Aug 1 19:53:33 CEST 2018

Hello everyone!

With use of *re* library it is possible to get all words in string with

  re:run("word1, word2 ,word3", "[a-z0-9]+", [global, {capture, all,
> binary}]).
>   {match,[[<<"word1">>],[<<"word2">>],[<<"word3">>]]}

 But *re2* doesn't have *global* option. So with *re2* I get:

re2:run("word1, word2 ,word3", "[a-z0-9]+", [{capture, all,
> binary}]).
> {match,[<<"word1">>]}

How could I find all words in string with *re2*?

Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180801/e11c62ed/attachment.htm>

More information about the erlang-questions mailing list