Export (0) Print
Expand All

Regular Expression Examples

Regular Expression Examples

Overview of regular expression examples.

The following examples show some handwriting regular expressions that you can create.

ExpressionDescriptionMatchesNon-matches
s(!IS_ONECHAR)+pMatches any word that begins with lower case "s", contains one or more characters (as defined by the IS_ONECHAR input scope), and ends with a lower case "p".stop

soup

schlep

s234p

Stop

sp

(0|1|2|3|4|5|6|7|8|9)Matches any single digit, 1 through 9.1

6

0

42

One

(0|1|2|3|4|5|6|7|8|9|,|-)+Matches one or more single digits, commas, or dashes. Useful for limiting input to a range or set of numbers, such as a range of pages to print.1

1-6

2,4,7

2-6,9,135

,,,

Three

7 thru 9

(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)-(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)-(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)A social security number. The format of a social security number is nnn-nn-nnnn.123-45-678912-123-12

12-2-3456

Show:
© 2014 Microsoft