igorm Posted April 18, 2008 Share Posted April 18, 2008 Is it possible to use StringInStr or StringRegExp to search for whole word only, and if it is, how can I do it? Cheers Office 2000/XP/2003/2007 Slipstreamer Link to comment Share on other sites More sharing options...
Dampe Posted April 18, 2008 Share Posted April 18, 2008 Could convert it to an array, then use an array search? Link to comment Share on other sites More sharing options...
igorm Posted April 18, 2008 Author Share Posted April 18, 2008 No I cant, I'm searching in large .txt file. But, tnx anyway for trying to help. Cheers Office 2000/XP/2003/2007 Slipstreamer Link to comment Share on other sites More sharing options...
Siao Posted April 18, 2008 Share Posted April 18, 2008 Maybe your helpfile is outdated, because I clearly see "\b Matches at a word boundary." documented as one of StringRegExp pattern characters. $sNeedle = "Alice" $x = StringRegExp(" Alice ", "\b"&$sNeedle&"\b") ConsoleWrite($x & @CRLF) $sNeedle = "lic" $x = StringRegExp(" Alice ", "\b"&$sNeedle&"\b") ConsoleWrite($x & @CRLF) "be smart, drink your wine" Link to comment Share on other sites More sharing options...
igorm Posted April 18, 2008 Author Share Posted April 18, 2008 Oh, thanks, and my help file is not outdated, but I did not know what word boundary means, since my native language is not English. Cheers Office 2000/XP/2003/2007 Slipstreamer Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now