Version of PCRE that PureBasic uses?

Everything else that doesn't fall into one of the other PB categories.
BarryG
Addict
Addict
Posts: 4160
Joined: Thu Apr 18, 2019 8:17 am

Version of PCRE that PureBasic uses?

Post by BarryG »

I'm using PureBasic v6.10 but can't find a way to determine which version of PCRE it uses for its Regular Expression library? I need to know because a customer has asked so they can use the correct syntax for one of their regex text. Thanks!
User avatar
IceSoft
Addict
Addict
Posts: 1694
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Re: Version of PCRE that PureBasic uses?

Post by IceSoft »

Code: Select all

ImportC ""
pcre_version(void);
EndImport

regex = CreateRegularExpression(#PB_Any, "")
pcre_version = pcre_version(0)
Debug PeekS(pcre_version)
Sorry seems no longer working.
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
User avatar
idle
Always Here
Always Here
Posts: 5864
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Version of PCRE that PureBasic uses?

Post by idle »

this Pb_ I had looked at it earlier thinking it was a variable rather than a function

Code: Select all

ImportC ""
 pb_pcre_version(void);
EndImport

regex = CreateRegularExpression(#PB_Any, "")
pcre_version = pb_pcre_version(0)
Debug PeekS(pcre_version,-1,#PB_Ascii)
User avatar
Shardik
Addict
Addict
Posts: 2058
Joined: Thu Apr 21, 2005 2:38 pm
Location: Germany

Re: Version of PCRE that PureBasic uses?

Post by Shardik »

idle's example was already posted by Fred about 9 years ago... :wink:
Collection of cross-platform examples with API functions to extend PureBasic
Little John
Addict
Addict
Posts: 4780
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Version of PCRE that PureBasic uses?

Post by Little John »

Shardik wrote: Fri Jul 18, 2025 9:12 am idle's example was already posted by Fred about 9 years ago... :wink:
Maybe it would be a good idea to include that snippet in the help.
User avatar
idle
Always Here
Always Here
Posts: 5864
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Version of PCRE that PureBasic uses?

Post by idle »

Maybe it would be a good idea to have all libs with a version function for cases like this.
Little John
Addict
Addict
Posts: 4780
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Version of PCRE that PureBasic uses?

Post by Little John »

idle wrote: Fri Jul 18, 2025 10:02 am Maybe it would be a good idea to have all libs with a version function for cases like this.
:thumbsup:
User avatar
IceSoft
Addict
Addict
Posts: 1694
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Re: Version of PCRE that PureBasic uses?

Post by IceSoft »

Ah yes "PB_" is needed too:
Here the correct version (void is 'empty"):

Code: Select all

ImportC ""
 pb_pcre_version();
EndImport

regex = CreateRegularExpression(#PB_Any, "")
pcre_version = pb_pcre_version()
Debug PeekS(pcre_version,-1,#PB_Ascii)
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
BarryG
Addict
Addict
Posts: 4160
Joined: Thu Apr 18, 2019 8:17 am

Re: Version of PCRE that PureBasic uses?

Post by BarryG »

Thanks, everyone. :)
User avatar
Piero
Addict
Addict
Posts: 885
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: Version of PCRE that PureBasic uses?

Post by Piero »

Wow; it's older than I thought, but at least it seems to support \K :wink:

Can't quickly find now, but there's a (10?) numbered groups support implementation in this forum (named groups are already available in PB)

Probably it's an AZJIO thing… Thanks!

PS/Edit:
It's this: viewtopic.php?p=643353#p643353
Post Reply