Skip to content

Commit

Permalink
run/regex: Add word regular expression
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Jung <a.jung@lancs.ac.uk>
  • Loading branch information
nderjung committed Dec 22, 2020
1 parent 83b91c6 commit f1a5264
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions run/regex.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ package run
import "regexp"

var (
// alphaRegexp defines the alphabetical atom, typically a single word.
alphaRegexp = match(`\w+`)

// alphaNumericRegexp defines the alpha numeric atom, typically a
// component of names. This only allows lower case characters and digits.
alphaNumericRegexp = match(`[a-z0-9]+`)
Expand Down

0 comments on commit f1a5264

Please sign in to comment.