e r l a n g : c o o k b o o k

Erlang.RegexChapter
  Difference Topic RegexChapter (r1.1 - 30 Aug 2004 - BrentAFulgham)
Added:
>
>

%META:TOPICINFO{author="BrentAFulgham" date="1093826200" format="1.0" version="1.1"}%

Regular Expressions

Introduction

Lisps and members of the Prolog family (like Erlang) in general are sort of famous for looking down on Regular Expressions. Other languages that lack Erlang's powerful pattern matching tend to fall back on regular expressions to provide some of that capability; one could argue that Regular Expressions have been badly overused. For example, any sort of pattern matching that involves stack-like matching (matching parentheses, quoted strings, etc.) is usually very difficult using regular expressions.

Some people, when confronted with a problem, think "I know, I’ll use regular expressions." Now they have two problems. -- Jamie Zawinski

Still, Regular Expressions are unbeatable for a lot of text processing tasks. Erlang provides built in regular expressions using the Unix egrep syntax.

Recipes

References

The AWK Programming Language, by A. V. Aho, B. W. Kernighan, P. J. Weinberger.

Mastering Regular Expressions, written by Jeffrey Friedl and published by O'Reilly & Associates.

Regular Expressions (regexp module) documentation



(edit comments)?

-- BrentAFulgham - 30 Aug 2004 %META:FORM{name="CookbookForm"}% %META:FIELD{name="TopicType" title="TopicType" value="Chapter"}% %META:FIELD{name="ParentTopic" title="ParentTopic" value="TOC"}% %META:FIELD{name="TopicOrder" title="TopicOrder" value="07"}%

 
 
Copyright © 2004 by the contributing authors. All material on the Erlang Cookbook web site is the property of the contributing authors.
This material can be redistributed and/or modified under the terms of the GNU Lesser General Public License (LGPL), version 2.1, as published by the Free Software Foundation.
Ideas, requests, problems regarding Schematics Cookbook? Send feedback.
/ You are Main.guest