[erlang-questions] using Perl regexp from erlang

YAMASHINA Hio <>
Wed Jun 6 11:56:52 CEST 2007


Hi, all.

I write a driver which enables using perl regexp from erlang.
Package is available at:
  http://fleur.hio.jp/pub/erlang/perlre-0.06.tar.gz


1> perlre:match("123abc", "(\\d+)(\\w+)").
{ok,["123","abc"]}
2> perlre:match("abc","def").
nomatch
3> perlre:gsub("1234567890", "(?<=\\d)(?=(\\d{3})+(?!\\d))", ",").
{ok,"1,234,567,890"}


Thanks

-- 
YAMASHINA Hio <>




More information about the erlang-questions mailing list