LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Match Pattern help - single capital letter followed by numbers and nothing else

Solved!
Go to solution

I am trying to create an expression for the Match Pattern function.  The pattern I want to match is: starts with any single capital letter, followed by any number of digits 0 to 9. There cannot be any other characters following the last digit.

 

Acceptable:

A1

B22

C333

 

Filter out:

A

AA

ABC

ABC123

aaa456

ABC123abc

AAA456def

B789ghi

C1J

D55:6

a123

 

This is what I have so far "^[B,D,E][0-9]"  however it allows characters following the last digit.

 

I've read that the Match Regular Expression is slower than the Match Pattern function. I have this in a loop so would like to use the Match Pattern function function if possible.

 

Thanks!

0 Kudos
Message 1 of 2
(2,734 Views)
Solution
Accepted by topic author TeraTech

Try ^[A-Z][0-9]+$

Message 2 of 2
(2,689 Views)