Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Problem with String and pcre
Problem with String and pcre [message #52966] Wed, 22 January 2020 14:36 Go to next message
lovmy is currently offline  lovmy
Messages: 44
Registered: November 2015
Member

Hello,

i try to create function to test string:

bool Verification::testExpressionReguliere( String texte, String expressionReguliere, int longueur )
{
RegExp regExp(expressionReguliere);
if ( texte != NULL && !texte.IsEmpty() )
{
if ( texte.GetLength() > longueur )
return( false );
else
{
regExp.Compile();
return ( regExp.GlobalMatch(texte) );
}
}
else
return( false );
}

bool Verification::testCaracteresAutorises( String texte, int longueur )
{
return testExpressionReguliere( texte, "^[\\p{L}\\p{N}&\\-_|=(°)?,'.:!@\\ \\/]{3," + std::to_string(longueur) + "}$", longueur );
}

when i do:

Verification verification;
verification.testCaracteresAutorises( "azerty", 10 );

i have error:

^[\p{L}\p{N}&\-_|=(°)?,'.:!@\ \/]{3,10}$
****************** PANIC: Invalid memory access!

Invalid memory access!

Can you help me ?

It's into a Skylark we application.

Thank !
  • Attachment: panic.png
    (Size: 167.39KB, Downloaded 181 times)
Re: Problem with String and pcre [message #52967 is a reply to message #52966] Wed, 22 January 2020 14:43 Go to previous message
lovmy is currently offline  lovmy
Messages: 44
Registered: November 2015
Member

It's OK without texte != NULL

Sorry, i try to migrate code from java application to C++ and i make error Surprised(
Previous Topic: Rendering a pdf
Next Topic: how do I add a package from bazaar/plugins/?
Goto Forum:
  


Current Time: Thu Mar 28 17:19:14 CET 2024

Total time taken to generate the page: 0.01240 seconds