Match string examples – Rockwell Automation 5370-OCR2 PAK User Manual

Page 68

Advertising
background image

Chapter 6

Using Match Strings

6–6

The following are examples of match string operations. For each match
string in the left column, the center column shows examples of strings which
would match, and the right column shows examples of strings which would
not match.

This match string

Matches this:

But not this:

ABC

ABC

ABCD

h

ABC

ABC

h

h

ABC

h

A.C

AAC
ABC
A7C
A

h

C

A

_

C

A?C

AC
ABCD
AXBC

h

?ABC

h

?

ABC

h

ABC

ABC

h

h

ABC

h

ABCD

Serial

h

#[0-9]+

Serial

h

#1

Serial

h

#534

Serial

h

#884773883878

Serial

h

#53A

Serial

h

575

Serial

h

#

X*$100

$100
X$100
XXXXXXXXX$100

Y$100
XXX

h

XXX$100

$100XXX

ABC[01234][0-9][0-9]

ABC123
ABC495
ABC001

ABC12
ABC558A
ABC834
ABC

h

159

(Lot

h

)?157

157
Lot

h

157

Lot157
Batch

h

157

Lot

h

158

(JAN|FEB|MAR|APR)

JAN
FEB
MAR

JUN
JUL
AUG

10\.554

10.554

10

h

554

10\.554

(P[0-9]

h

)*P7

P7
P5

h

P6

h

P7

P1

h

P1

h

P3

h

P0

h

P5

h

P1

h

P7

P6
P4

h

P5

h

P6

P6

h

P7

h

P8

h

P9

P13

h

P7

h

= space

Match String Examples

Advertising