O'Reilly logo

Learning Haskell Data Analysis by James Church

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix A. Regular Expressions in Haskell

In Chapter 3, Cleaning Our Datasets, we discussed the use of regular expressions to assist the programmer in finding irregularities in datasets. Chapter 3, Cleaning Our Datasets, in my opinion, is the most important chapter in the book. This appendix sets out to compile a list of the most frequently used regular expression features. Before we begin, we must import the regex-posix package:

> import Text.Regex.Posix

A crash course in regular expressions

A regular expression is made up of atoms. An unmodified atom in a regular expression must match one, and exactly one, instance of a matching sequence in a string in order to satisfy the expression. When two or more unmodified atoms appear consecutively in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required