[TriLUG] Regular Expression Help
Nathan Conrad
conrad at bungled.net
Wed Dec 24 11:55:06 EST 2003
Hi,
Here is a POSIX-compatible regular expression:
^Re: [A-Z]{2,8}, [^ ]* [^ ]* [^ ]*$
It assumes that words are strings of non-spaces.
The carrot matches the begining of a line. [A-Z] means all characters
between A and Z. {2-8} repeats 2-8 times. The [^ ] is all characters
except spaces. And the dollarsign matches the end of a line.
-Nathan
On Wed, Dec 24, 2003 at 10:41:15AM -0500, Tarus Balog wrote:
> Howdy.
>
> I need a regular expression for the following:
>
> The characters "Re: " followed by 2 to 8 capital letters, followed by a
> comma and space ", " and then three random words, separated by spaces.
>
> Such as:
>
> Re: CEGRUJAV, finally the door
> Re: WPXPM, them and came
> Re: OIJ, what? what? what
>
> -T
> ________________________________________________________________________
> ___
> Tarus Balog Main: +1
> 919 545 2553
> Blast Internet Services, Inc. Fax: +1
> 919 542 5955
> Email: tarus at blast.com URL:
> http://www2.blast.com/tarus
> PGP Key Fingerprint: 8945 8521 9771 FEC9 5481 512B FECA 11D2 FD82 B45C
>
> --
> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
> TriLUG PGP Keyring : http://trilug.org/~chrish/trilug.asc
--
Nathan J. Conrad Campus phone #5930
301 Scott hall, UNC Charlotte http://bungled.net
GPG: F4FC 7E25 9308 ECE1 735C 0798 CE86 DA45 9170 3112
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://www.trilug.org/pipermail/trilug/attachments/20031224/5db85a88/attachment.pgp>
More information about the TriLUG
mailing list