Re: newbie question: Regular expression lookbehind?
- From: Martin Honnen <mahotrash@xxxxxxxx>
- Date: Thu, 28 Jun 2007 17:45:25 +0200
cjl wrote:
new RegExp("^\\s*class\\s([A-Za-z]+)", 'gm')
How do I ignore 'class' without a lookbehind?. I think my regular
expression is returning two groups:
0: class monkey
1: monkey
I only want it to return the second group.
Can anyone point me in the right direction?
Use that expression, call the exec method and access the second item in the returned array.
--
Martin Honnen
http://JavaScript.FAQTs.com/
.
- References:
- Prev by Date: newbie question: Regular expression lookbehind?
- Next by Date: Re: OnLoad events on elements other than BODY ?
- Previous by thread: newbie question: Regular expression lookbehind?
- Next by thread: OO question with anonymous functions
- Index(es):