newbie question: Regular expression lookbehind?
- From: cjl <cjlesh@xxxxxxxxx>
- Date: Thu, 28 Jun 2007 15:39:50 -0000
JS:
I've read that javascript regular expression do not have 'lookbehind'
functionality.
Given the following text:
class monkey(blah):
I would like to contruct a regular expression that matches 'monkey'.
So far I have:
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?
Thanks in advance,
cjl
.
- Follow-Ups:
- Re: newbie question: Regular expression lookbehind?
- From: Martin Honnen
- Re: newbie question: Regular expression lookbehind?
- Prev by Date: OOJS Question
- Next by Date: Re: newbie question: Regular expression lookbehind?
- Previous by thread: OOJS Question
- Next by thread: Re: newbie question: Regular expression lookbehind?
- Index(es):
Relevant Pages
|