LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Regular Expression help

Just a quick quesiton --

Basically, if I want to find "cat" OR "dog" in a string, how do I write
the RegExp?

I'm using Match Pattern VI, and I'm looking for ".txt" or ".tst" in a
file name (I have the whole file name in string form). I have a
solution now, but it's not the 'correct' way. ".[tT][sSxX][tT]"

Rick
0 Kudos
Message 1 of 2
(4,266 Views)
In article <3777C27A.4B45758B@csciences.com>,
Rick Nelson wrote:
> Just a quick quesiton --
>
> Basically, if I want to find "cat" OR "dog" in a string, how do I
write
> the RegExp?
>
> I'm using Match Pattern VI, and I'm looking for ".txt" or ".tst" in a
> file name (I have the whole file name in string form). I have a
> solution now, but it's not the 'correct' way. ".[tT][sSxX][tT]"
>
> Rick

Hi,

I think you have to use two separate �match pattern.vi's. One for �dog'
and the other one for �cat'. Then you can use both �offset past matches'
to decide if one of the searched words were found.
Hope that helps.

Bye,

Alexander


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
0 Kudos
Message 2 of 2
(4,266 Views)