realbasic-nug
[Top] [All Lists]

Re: RegEx in language reference

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: RegEx in language reference
From: Mark Nutter <manutter51 at yahoo dot com>
Date: Mon, 31 Oct 2005 05:20:12 -0800 (PST)
Delivered-to: realbasic-nug at lists dot realsoftware dot com
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=cHb7ZsfRe3LDVxcE7dCFF+EVXcevqawmyyRt39IgQJBpbRLFMvJCeMdgwqgeBU6ny0Xs4ATqt2SJe8JM7fJnx2Y/8JIC+HJ6j5oyEMPTC1cX8u74W/q9K6U9Rbi8eHgGuLIhocT4p7PfpFHZdiNgeD7tFRKMqa2KnyC/5czNQvU= ;

--- Markus Winter <markus_winter at blueyonder dot co dot uk>
wrote:

> I¹m just not getting this ­ is it me or is it the
> language reference?
> 
> >From the language reference:
> 
> 
>   The Alternation Operator
> 
>   The alternation operator (|) allows you to match
> any of a number of
>   patterns using the logical "or" operator. Place it
> between two existing
>   patterns to match either pattern. You can use more
> than one alternation
>   operator in a pattern:
> 
>   Pattern                      Matches
>   \she\s                       \sshe\s
>   cat                            dog
>   ([0-9,]+\sB\.C\.)      ([0-9,]+\sA\.D\.) or
> [0-9,]+\s((B\.C\.)

Don't worry, it's not you.  That portion of the
language reference is complete gibberish.

The alternation operator is simply an "or" operator.

Pattern               Matches
(a|b)                   a or b
(a+|ab)               a or aa or aaa or ab etc
(jan|feb|mar)      jan or feb or mar


Mark Nutter

Quick and easy regex creation and debugging!
http://www.bucktailsoftware.com/products/regexplorer/


                
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>