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 » Whole word find string
Re: Whole word find string [message #27067 is a reply to message #27044] Thu, 24 June 2010 09:30 Go to previous messageGo to previous message
forlano is currently offline  forlano
Messages: 1215
Registered: March 2006
Location: Italy
Senior Contributor
forlano wrote on Tue, 22 June 2010 21:32

Hello,

I need to find a substring in "whole word" mode.


It seems the RegExp library does the job.
Something like this:

String p = "(\\b" + pattern + "\\b)";
RegExp r0(p);
if( r0.Match( mystring ) ) { ... }

is able to find the string pattern in whole word mode. The trick was to set the \\b at the begin and at the end of the wanted string.

Luigi

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: int64 formating
Next Topic: [NOT A BUG!] DayOfWeek
Goto Forum:
  


Current Time: Wed Aug 27 01:17:23 CEST 2025

Total time taken to generate the page: 0.05487 seconds