LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string wildcard

Solved!
Go to solution
Spoiler

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

 

 

 

0 Kudos
Message 1 of 5
(6,599 Views)

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.

Visualize the Solution

CLA

LabVIEW, LabVIEW FPGA
Message 2 of 5
(6,589 Views)
Solution
Accepted by topic author SeanJ

@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

Message 3 of 5
(6,578 Views)

Thanks ben64,

 

I just couldn't remember!  The exact equivalent id * = [^]+

 

Sean

0 Kudos
Message 4 of 5
(6,547 Views)

Sorry, that should have read thanks Dave.

 

Thanks to you both, S

0 Kudos
Message 5 of 5
(6,544 Views)