What's a quick and real neat way of....

Stephen Judd StephenJ at web.co.nz
Wed Nov 6 14:14:31 CST 2002

> -----Original Message-----
> From: Enkidu [mailto:enkidu at cliffp.com]
> Sent: Wednesday, 6 November 2002 10:05 p.m.
> To: wellington-pm-list at pm.org
> Subject: Re: What's a quick and real neat way of....
> OK, thanks. What does the "[]" constract do? 

It defines a "character class". Eg:


matches any digit. You could think of it as (0|1|2|3|4|5|6|7|8|9). 


matches c, f, i or l. You can append a quantifier like * or + just as you can with any other character.

A caret at the beginning of a character class negates the whole thing. Thus:


will not match a, b, c or d.


More information about the Wellington-pm mailing list