<div dir="ltr">Apologies, just after Hugo Mills' reply I noticed your question was related to leex and not re.<div><br></div><div>leex does not support unicode character classes, such as \p or \w. It does accept unicode as its input as well as unicode characters as literals in your rules, such as [á-ú], the pound sign, etc.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div><br></div><div><br></div><div><span style="font-size:13px"><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b>José Valim</b></span></div><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><div><span style="font-family:verdana,sans-serif;font-size:x-small"><a href="http://www.plataformatec.com.br/" style="color:rgb(42,93,176)" target="_blank">www.plataformatec.com.br</a></span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small">Skype: jv.ptec</span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small">Founder and Director of R&D</span></div></span></div></span></div></div></div></div></div>
<br><div class="gmail_quote">On Tue, Dec 13, 2016 at 11:40 AM, José Valim <span dir="ltr"><<a href="mailto:jose.valim@plataformatec.com.br" target="_blank">jose.valim@plataformatec.com.br</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Make sure to escape the property escape character and to also pass the [unicode] flag when compiling and it should be good to go:<div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>28> {ok, Reg} = re:compile("\\p{L}{5}", []).</div></div><div><div>{ok,{re_pattern,0,0,0,</div></div><div><div> <<69,82,67,80,77,0,0,0,0,0,0,<wbr>0,1,0,0,0,255,255,255,255,</div></div><div><div> 255,255,...>>}}</div></div><div><div>29> re:run(<<"こんにちは"/utf8>>, Reg).</div></div><div><div>nomatch</div></div><div><br></div><div><div>30> {ok, RegUni} = re:compile("\\p{L}{5}", [unicode]).</div></div><div><div>{ok,{re_pattern,0,1,0,</div></div><div><div> <<69,82,67,80,77,0,0,0,0,8,0,<wbr>0,1,0,0,0,255,255,255,255,</div></div><div><div> 255,255,...>>}}</div></div><div><div>31> re:run(<<"こんにちは"/utf8>>, RegUni).</div></div><div><div>{match,[{0,15}]}</div></div></blockquote></div><div class="gmail_extra"><br clear="all"><div><div class="m_4658001589830606100gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div><br></div><div><br></div><div><span style="font-size:13px"><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b>José Valim</b></span></div><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><div><span style="font-family:verdana,sans-serif;font-size:x-small"><a href="http://www.plataformatec.com.br/" style="color:rgb(42,93,176)" target="_blank">www.plataformatec.com.br</a></span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small">Skype: jv.ptec</span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small">Founder and Director of R&D</span></div></span></div></span></div></div></div></div></div>
<br><div class="gmail_quote"><div><div class="h5">On Tue, Dec 13, 2016 at 11:32 AM, Zachary Kessin <span dir="ltr"><<a href="mailto:zkessin@gmail.com" target="_blank">zkessin@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>Hi All<br><br></div>I am hitting a bit of a wall here, I am building a lexer with leex and I really want to match on unicode chars, there is a regex class \p{Letter} but that does not seem to work in erlang. I really want is a way to say "Match a letter, but not a digit". So the \w would not work. Any ideas?<span class="m_4658001589830606100HOEnZb"><font color="#888888"><br clear="all"><div><div><br>-- <br><div class="m_4658001589830606100m_-3853987315892237806gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Zach Kessin</div><div><a href="http://squaretarget.rocks?utm_source=email-sig" target="_blank">SquareTarget</a></div><div><span style="font-size:12.8px">Twitter: </span><a href="https://twitter.com/zkessin" style="font-size:12.8px" target="_blank">@zkessin</a><br></div><div>Skype: zachkessin<br></div></div></div></div></div></div></div>
</div></div></font></span></div>
<br></div></div>______________________________<wbr>_________________<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" rel="noreferrer" target="_blank">http://erlang.org/mailman/list<wbr>info/erlang-questions</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>