Example:
# Objects:
math =
root: Math.sqrt
square: square
cube: (x) -> x * square x
# Splats:
race = (winner, runnners...) ->
print winner, runners
I want to match cube
and race
(variables/objects that store functions).
I realized I can't use ^w
because it won't match the words with a space behind, like cube
.
What regex should I use in this case?
See Question&Answers more detail:os