0

I am just starting to learn js and I got stuck to regexp at a specific expression. Can you figure out what !![a-z]* will match ? I can't seem to figure this one out.

1
  • This is not JavaScript specific. Commented Jun 19, 2011 at 17:38

3 Answers 3

4

You should really consider reading how regular expressions work. Have a look at http://www.regular-expressions.info/tutorial.html.

That would match 2 exclamation marks (!) followed any number of letters from a to z.

Sign up to request clarification or add additional context in comments.

Comments

1

Two exclamation marks followed by any number (including 0) of characters from a to z.

Comments

0
'!!abcdefgh$asd124123'.match(/!![a-z]*/g)
return ["!!abcdefgh"]

'!!#abcdefgh$asd124123'.match(/!![a-z]*/g)

return ['!!']

1 Comment

From review queue: May I request you to please add some context around your source-code. Code-only answers are difficult to understand. It will help the asker and future readers both if you can add more information in your post.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.