C
cjl
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
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