I\'m trying to match the hash fragment of a jQuery Mobile URL like this:
matches = window.location.hash.match ///
# # we\'re in
Implementer here. Heregex comments are removed altogether with whitespace using a simple regex (/\s+(?:#.*)?/g
), so any non-whitespace character before #
(or placing it at the very beginning) works.
$ coffee -bcs
/// [#] ///
/// (?:#) ///
///#///
// Generated by CoffeeScript 1.2.1-pre
/[#]/;
/(?:#)/;
/#/;