[thelist] Regular Expression in Javascript

Thorne, Brenton Brenton.Thorne at sunwater.com.au
Tue Jun 17 00:15:01 CDT 2003


> 
> 
> I wrote:
> 
> >> Might be that /< is a meta-sequence to match the start of a word
> >> -- in
> >> your case, a word that starts with plain old "a".
> 
> You replied:
> 
> >  I don't know what you mean by 'meta-sequence', but
> > string.match(re,string) normally returns either an array of
> > matches or 'null'.  When trying to match /<a>/gi it returned
> > nothing at all...
> 
> A meta-sequence is simply a regexp term for a series of metacharacters
> (.^$*? are examples of metacharacters). For instance, the
> meta-sequence </ means "start of word" so as it's used here
> 
> </some word
> 
> it says to match a word that begins with "some", thereby excluding the
> words "foursome" or "lonesome".
> 
> Your code snippet
> 
> /<a/gi
> 
> if I understand it correct, is in effect saying "find a word that
> begins with 'a' "; it' not saying "find '<a' "

yes, that makes good sense :)  All the javascript re info I found online didn't mention /< as a sequence...

> 
> Make sense? I just started with regexp myself and have found the
> O'Reilly (of course) book "Mastering Regular Expressions" excellent --
> first two chapters provide a lot of the understanding I need for my
> regular tasks, but it goes very deep beyond that and it's surprisingly
> comprehensible.
> 
> -------------
> Regards,
> Bob Haroche
> O n P o i n t  S o l u t i o n s
> www.OnPointSolutions.com
> 
> -- 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> 
> Evolt.org conference in London, July 25-27 2003.  Register 
> today at http://evolt.org.uk
> 
> For unsubscribe and other options, including the Tip Harvester 
> and archives of thelist go to: http://lists.evolt.org 
> Workers of the Web, evolt ! 
> 

***********************************************************************
The information in this e-mail together with any attachments is
intended only for the person or entity to which it is addressed
and may contain confidential and/or privileged material.
Any form of review, disclosure, modification, distribution
and/or publication of this e-mail message is prohibited.  
If you have received this message in error, you are asked to
inform the sender as quickly as possible and delete this message
and any copies of this message from your computer and/or your
computer system network.  
Any attachments should be checked for viruses by you, before being opened. SunWater accepts no responsibility for an attachment that contains a virus.
***********************************************************************


More information about the thelist mailing list