urlview icon indicating copy to clipboard operation
urlview copied to clipboard

pcreregex instead of regex

Open mexas opened this issue 12 years ago • 4 comments

A user suggested pcreregex instead of regex:

Index: urlview.c

--- urlview.c (revision 15) +++ urlview.c (working copy) @@ -42,7 +42,7 @@ #include <sys/stat.h>

#ifdef HAVE_REGEX_H -#include <regex.h> +#include <pcreposix.h> #else #include <rx/rxposix.h> #endif

see aso http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/182853

I has to be linked with

LDFLAGS+= -L${LOCALBASE}/lib -lpcreposix -lpcre

On FreeBSD it builds and works fine with this change, but I'm not sure you want to add it the code. What do you think?

mexas avatar Oct 17 '13 10:10 mexas

This would be ok, but it should be enabled by the configure script, like configure --with-pcre, and the default should make urlview function the way it traditionally has, by using posix regex.

sigpipe avatar Oct 17 '13 20:10 sigpipe

Would you please add mentioned functionality? PCRE is very useful when one wants to e.g. exclude some urls using zero-width look-ahead assertions - like "(?!pattern)" - from catching by urlview . Thanx in advance.

yermulnik avatar Oct 19 '13 16:10 yermulnik

I've submitted a WIP PR for this https://github.com/sigpipe/urlview/pull/11

keith avatar Jan 18 '16 03:01 keith

thanx

yermulnik avatar Jan 18 '16 08:01 yermulnik