#define MATCH_BROWSER "^(([^:/?#]+)://)?([^/?#])([^?#]*)(\\?([^#]*))?(#(.*))?" This RegEx is horribly written and matches nearly everything possible. If I knew what the entirety of the goal is for it I would offer a correction. It's used both in 0.3.106 and 0.6.0, however I'm running 0.3.106 and that's where it's giving me a headache currently, trying to implement a custom protocol for use in Chrome. No matter what, because this line *ALWAYS* matches, all exo-open will do is open another Chrome window. It will *NEVER* default to gnome-open like it should. (Note: The only things that won't match are things that start with one of /?# which is, of course, nothing you'd ever pass to exo-open) Honestly I'd suggest only opening http:// and https:// links in the browser. Sure browsers handle other stuff, but that's all they're really meant for.
Yeah, true. Probably better to use the regexes from terminal for this: http://git.xfce.org/apps/terminal/tree/terminal/terminal-widget.c
Applied a much better regex in 2c655ce.