RegEx crash

Just starting out? Need help? Post your questions and find answers here.
Garfield
New User
New User
Posts: 8
Joined: Sun Dec 10, 2023 6:32 pm

RegEx crash

Post by Garfield »

The following code does crash in 6.03.
"The specified #RegularExpression is not initialised"

regex has a value<>0

It's working fine in windows and linux.

Code: Select all

Dim match1$(0)
regex.l = CreateRegularExpression(#PB_Any, "[Ss]\d{1,2}[Ee]\d{1,2}")  
ExtractRegularExpression(regex, "S01E01 - blabla", match1$())
User avatar
STARGÅTE
Addict
Addict
Posts: 2237
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: RegEx crash

Post by STARGÅTE »

The returning value of PureBasic library objects is always an Integer (not a Long).
Use regex.i
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
Garfield
New User
New User
Posts: 8
Joined: Sun Dec 10, 2023 6:32 pm

Re: RegEx crash

Post by Garfield »

oh damn, yes, you're right. With .i it's working on mac too.

Thank you.
Post Reply