[erlang-questions] regexp module

Michael McDaniel erlangx@REDACTED
Wed Oct 10 23:33:01 CEST 2007


On Wed, Oct 10, 2007 at 11:18:42PM +1300, Liam Clarke wrote:
> Hi all,
> 
> Quick question, is there a way to do case insensitive matches with the
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A bit of a pain, but you could do ...

1> regexp:matches("This IS the string, isn't it?", "[Ii][Ss]").
{match,[{3,2},{6,2},{21,2}]}
2>

I force some fields to all upper case myself for fixed length user
input data.

~Michael

> regexp module? I've hacked together a function to lower case
> everything and go from there, but I just got that 'reinventing the
> wheel' feeling that I get when in the early stages of familiarity with
> a language and its libraries.
> 
> Regards,
> 
> Liam Clarke
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
> 
> !DSPAM:52,470ca71773321088629368!
> 
> 

-- 
Michael McDaniel
Portland, Oregon, USA
http://autosys.us
+1 503 283 5284



More information about the erlang-questions mailing list