Inbound - Additional Help with Regular Expressions

<< <%SKIN-STRTRANS-SYNCTOC%> >>

Inbound - Additional Help with Regular Expressions

 

Example regular expressions that can be used for pattern matching for Inbound keyword choices:

 

Example 1: Match word, irrespective of the case (case insensitive)

 

Subkeyword: BLUE

 

Example matches:

 

blue

BLUE

bLuE

 

 

Example 2: Exception Rule for answers 0,1,2,3,4,5,6,7,8,9,10 or Stop  (to cover zero "0" you may want to include alpha characters "o" and "O"

 

Sub-keyword rule: (?!(0|1|2|3|4|5|6|7|8|9|10|zero|one|two|three|four|five|six|seven|eight|nine|ten|stop))

 

Example matches:

 

sto

Blah

nil

naught

 

Example 3: Multiple Options i.e. for answers 9 or 10

 

Sub keyword Rule: 9|nine|10|ten

 

Example matches:

 

9

10

nine

tEN

 

Example 4: Exact Match only for 0, 1, 2, 3 , 4, 5, 6, 7, 8 include Alpha "o" and "O"

 

Sub keyword rule: \b0\b|\b1|2|3|4|5|6|7|8|zero|one|two|three|four|five|six|seven|eight|o|O

                where \b0\b matches "0" but does not match "10"

 

Example matches:

 

1

2

FoUR

0

o