10-06-2011 06:06 AM
Hi,
I want to search for all word beginning with 'b' and ending in 's', e.g. boris, bolivians, beings, etc.
In DOS I could look for b*s but in labVIEW there does not appear to be a wildcard that ignores the middle length.
I could use 'b.s', 'b..s', 'b...s', etc.
Is there any simple way of doing this without having to do the above?
Sean
Solved! Go to Solution.
10-06-2011 06:59 AM
Check out the Match pattern help - I admit it takes a little deduction to discover.
"b[a-z]+s" will match lowercase words starting with b and ending with s.
10-06-2011 08:53 AM - edited 10-06-2011 08:54 AM
@SPECTRE Dave wrote:
Check out the Match pattern help - I admit it takes a little deduction to discover.
"b[a-z]+s" will match lowercase words starting with b and ending with s.
b[a-z]+s will match words beginning with b and ending with s but will also match section of word in some cases, as an example it will match "bus" in abusive. To insure match on whole words only you should use the match regular expression vi (it gives you more options for matching strings) with word boundaries \b to your search expression: \bb[a-z]+s\b
Ben64
10-07-2011 08:25 AM
Thanks ben64,
I just couldn't remember! The exact equivalent id * = [^]+
Sean
10-07-2011 08:27 AM
Sorry, that should have read thanks Dave.
Thanks to you both, S