harlow/turnip — comment on commit 0284c4b9685be16db44dd73c51993223da3e0322
File: lib/turnip/placeholder.rb line 30
By leshill:

How about:

%r((?:["']([^["']]*)["']|([a-zA-Z0-9_-]+)))