Well the documentation already state it so i believe no need to reply that side question :)<div><meta charset="utf-8"><span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: medium; ">The default return type is (zero-based) indexes of the captured parts of the string, given as <span class="code" style="font-family: courier; font-weight: normal; ">{Offset,Length}</span> pairs (the <span class="code" style="font-family: courier; font-weight: normal; ">index</span> <span class="code" style="font-family: courier; font-weight: normal; ">Type</span> of capturing).</span></div>
<div><font class="Apple-style-span" face="Verdana, Arial, Helvetica, sans-serif" size="3"><br></font><br><div class="gmail_quote">On Tue, Apr 19, 2011 at 4:21 PM, Ahmed Omar <span dir="ltr"><<a href="mailto:spawn.think@gmail.com">spawn.think@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I mean i understand it's different indexing, but was there specific reason to change that?<div><div></div><div class="h5">
<br><br><div class="gmail_quote">On Tue, Apr 19, 2011 at 4:18 PM, Ahmed Omar <span dir="ltr"><<a href="mailto:spawn.think@gmail.com" target="_blank">spawn.think@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>regexp:split("Hello world, Hello", "[ ]*,[ ]*").             </div><div>{ok,["Hello world","Hello"]}</div>

</div><div><br></div><div>re:split("Hello world, Hello", "[ ]*,[ ]*",[{return, list}]).</div>
<div>["Hello world","Hello"]</div><div><br></div><div><div>regexp:matches("Hello \n","\n").</div><div>{match,[{7,1}]}</div><div><br></div><div>re:run("Hello \n","\n").        </div>


<div>{match,[{6,1}]}</div></div><div><br></div><div>but i'm not sure why the start position is different here</div><div><div></div><div><br><div class="gmail_quote">On Tue, Apr 19, 2011 at 3:30 PM, Bengt Kleberg <span dir="ltr"><<a href="mailto:bengt.kleberg@ericsson.com" target="_blank">bengt.kleberg@ericsson.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Greetings,<br>
<br>
I have inherited some code without a test directory. I get the following<br>
compiler warnings:<br>
./compile_funcs.erl:603: Warning: regexp:split/2: the regexp module is<br>
deprecated (will be removed in R15A); use the re module instead<br>
./compile_funcs.erl:645: Warning: regexp:matches/2: the regexp module is<br>
deprecated (will be removed in R15A); use the re module instead<br>
<br>
The lines are:<br>
            {ok, Class} = regexp:split(Class0, "[ ]*,[ ]*"),<br>
and<br>
    {match,A}=regexp:matches(String,"\n"),<br>
<br>
I thought "[ ]*,[ ]*" would mean:<br>
the character class of " " (space), 0 or many times, followed by literal<br>
"," followed by the character class of " " (space), 0 or many times.<br>
<br>
This is not the case and I am not having any luck with randomly<br>
constructing strings to find one that triggers a Class that is different<br>
from Class0.<br>
<br>
Perhaps someone knows what "[ ]*,[ ]*" really means, and what to replace<br>
these with when using the re module.<br>
<br>
<br>
bengt<br>
<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br><br clear="all"><br></div></div><font color="#888888">-- <br>Best Regards,<br>- Ahmed Omar<div><a href="http://nl.linkedin.com/in/adiaa" target="_blank">http://nl.linkedin.com/in/adiaa</a></div><div>

Follow me on twitter</div><div><a href="http://twitter.com/#!/spawn_think" target="_blank">@spawn_think</a></div>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Best Regards,<br>- Ahmed Omar<div><a href="http://nl.linkedin.com/in/adiaa" target="_blank">http://nl.linkedin.com/in/adiaa</a></div><div>Follow me on twitter</div>

<div><a href="http://twitter.com/#!/spawn_think" target="_blank">@spawn_think</a></div><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Best Regards,<br>- Ahmed Omar<div><a href="http://nl.linkedin.com/in/adiaa" target="_blank">http://nl.linkedin.com/in/adiaa</a></div><div>Follow me on twitter</div>
<div><a href="http://twitter.com/#!/spawn_think" target="_blank">@spawn_think</a></div><br>
</div>