jashkenas--coffeescript/documentation/examples/heregexes.coffee

7 lines
175 B
CoffeeScript

NUMBER = ///
^ 0b[01]+ | # binary
^ 0o[0-7]+ | # octal
^ 0x[\da-f]+ | # hex
^ \d*\.?\d+ (?:e[+-]?\d+)? # decimal
///i