[ka-Map-users] compression 2.0
Brent Pedersen
bpederse at gmail.com
Mon Oct 10 17:28:49 EDT 2005
hi, i realized i could just change the regular expressions in getcjs, i
don't think it can get much smaller than this:
$aSearch = array('/\/\/.*/', // c++ style comments - //something
'/\/\*.*\*\//sU', // c style comments - /* something */
'/\s{2,}/s', //2 or more spaces down to one space
'/\n/', //newlines removed
'/\s*(=|;|\}|\{|\)|\(|\)|\+|\*|\-|\,|\/|>|<|:|\?|\|\||\&\&)\s*/',
'/\}(\w+)/',
'/\};(catch|finally|else)/',
);
$aReplace = array( '',
'',
' ',
'',
'\1',
'};\1',
'}\1',
);
that works for kaMap, might break other stuff.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20051010/e47c4b9b/attachment.html
More information about the ka-Map-users
mailing list