[Javascript] regular expressions for Javascript

Shawn Milo milo at linuxmail.org
Thu May 13 14:33:27 CDT 2004


Thanks for the info and links.  There is obviously a huge amount of 
preface required to introduce a scripter to regexes.

Originally, the page was supposed to be a 'quickie', and just give some
working examples to JS scripters.  If I want it to be more than that,
then I'm going to have to do a lot of work.  However, your page handles
that very well.  I think I going to just link to your page, along with
a few others, at the top of mine.

One thing that I still find lacking when I search for answers on Google
is a working example of what I'm looking to do.  There are endless
pages of definitions and descriptions of what things do, but for someone
who is doing something for the first time, it is difficult
to get their first attempt to work using descriptions and not actual
working snippets.  In my opinion, anyway.

I'll do some additions, and maybe trim some of the fat from my page, such
as the definitons of the special characters at the top.

Shawn







----- Original Message -----
From: liorean <liorean at f2o.org>
Date: Thu, 13 May 2004 21:17:42 +0200
To: "[JavaScript List]" <javascript at LaTech.edu>
Subject: Re: [Javascript] regular expressions for Javascript

> Shawn Milo wrote:
> > I've done a little work on my regex primer.  Actually, I've
> > made a copy, and customized it for Javascript.  I'm hoping that
> > some of you might take a look at it, and give me suggestions
> > for how I can improve on it.  When I think that it is 
> > in good shape, I'm going to post it on comp.lang.javascript
> > as a general guide.
> > 
> > http://linurati.net/shawn/regex_js.html
> 
> I would recommend you to add a few links to reseources that explain a little more in-detail, or at least throw in links to the resources on the subject available from MSDN and Devedge.
> <http://devedge.netscape.com/library/manuals/2000/javascript/1.5/reference/regexp.html#1193136>
> <http://devedge.netscape.com/library/manuals/2000/javascript/1.5/reference/string.html>
> <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/js56jsobjRegExp.asp>
> <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/js56jsobjstring.asp>
> 
> I have myself written an article on the subject that you might want to link as well:
> <http://www.evolt.org/article/Regular_Expressions_in_JavaScript/17/36435/>
> 
> 
> Well, on to separate issues, then.
> - I think you should explain what '$2' means as the second argument to String.replace before you use it for the first time instead of long after.
> - In the test if a string is all numeric, why are you useing [0-9] instead of \d?
> - I think it would be better if you used one highlighting for code samples, and one highlighting for the regular expression pattern.
> -- 
> David "liorean" Andersson
> 
> ViewStyles, ViewScripts, SwitchStyles and GraphicsInfo bookmarklets:
> <http://liorean.web-graphics.com/>
> Hangouts:
> <http://codingforums.com/> <http://yourmusicforums.com/>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list