Erlang/OTP Forums

Author Message

<  Erlang bugs mailing list  ~  run reports incorrect match position

Guest
Posted: Thu Mar 04, 2010 2:47 pm Reply with quote
Guest
Hello,

I am not sure if this is a bug in R13B04 or not, but I am experiencing
the following issue:

1> re:run([1058,1077,1089,1090] ++ "http://example.com/index.php?a=b", "http", [unicode]).
{match,[{8,4}]}

I am trying to find position of a match in a string (list, not a binary) with unicode
characters. Since the string has 4 unicode symbols and then the matching
part I suppose that re:run should return {match, [{4,4}]} when I pass a
list, and {match, [{8, 4}]} when I pass a binary. Right now it returns
{match, [{8, 4}]} in both cases.
Is this a bug? If not, how can I get position of a match in unicode string?

Thank you.
--
Alexander Zhuravlev

________________________________________________________________
erlang-bugs (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org

Post received from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum