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 » U++ Library support » U++ Core » RegExp this'n that (RegExp update)
Re: RegExp this'n that [message #50079 is a reply to message #47047] Sun, 15 July 2018 23:09 Go to previous message
luoganda is currently offline  luoganda
Messages: 197
Registered: November 2016
Experienced Member
This does not match, but it's taken directly from pcre 8.xx manual.
It matches correctly on many pcreCompatibleOnlinePages,eg this one regexr, if testing - don't forget to check pcre there in right-upper corner and to use single '\' if copying down pattern.
Also, subfunc of Match func in this case produces an error(pcre_exec returns -5 which is PCRE_ERROR_UNKNOWN_OPCODE), but it's not cought by upp, that is - error funcs doesn't know about it, a silent error.
This should match a balanced '(...abc(...)abc...)' pattern.

String s="(abc)";
RegExp re("\\(([^()]++|(?R))*\\)");
if(re.Match(s))PromptOK("\1Matches");
if(re.IsError())PromptOK(String("\1RegExpErr: ")<<re.GetError());


Anyone has some idea why this is so?

[Updated on: Sun, 15 July 2018 23:20]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Incorrect SHA1 checksum for files 4GB+
Next Topic: ONE and assignement
Goto Forum:
  


Current Time: Tue May 07 10:43:56 CEST 2024

Total time taken to generate the page: 0.01808 seconds