ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] Can I safely use PCRE in wiretap file reader?

From: Stephen Fisher <steve@xxxxxxxxxxxxxxxxxx>
Date: Sat, 18 Sep 2010 14:44:47 -0600
On Sat, Sep 18, 2010 at 01:46:43PM -0400, Hadriel Kaplan wrote:

> Thanks for the tip! (I had looked at GRegex but worried about older 
> GLib, but version checking is fine with me) BTW, your answer of "yes" 
> means I cannot safely use plain PCRE, or yes I can safely use it?

You can use PCRE instead, but make sure to wrap it in #ifdef 
HAVE_LIBPCRE (which requires having #ifdef HAVE_CONFIG_H /
#include "config.h" at the top).  However, the configure script will 
prefer GRegex over PCRE (see configure.in).  I didn't look carefully at 
how GRegex was added to Wireshark as someone else committed it, but it 
sounds like GRegex is preferred and pcre *may* go away some day 
(probably not anytime soon though).