Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • What is "[$\w]*" for? That I don't understand. Thanks for the regexp anyway. Commented May 25, 2014 at 17:34
  • [$\w] matches all letters, numbers, underscores and $ characters. This is to match every character that can be part of a variable name (but not the first character, that cannot be a number). Commented May 25, 2014 at 22:31
  • Isn't it alread done by "[\$A-Za-z_]" ?? Plus, shouldn't the short cut '\w' be outside of a class definition "[]" Commented May 25, 2014 at 23:01

default