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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…