Use non-capturing match group in alphanumeric regex
If the group is non-capturing, Clojure will not form match groups with `re-groups`. We only use this regex as a predicate and don't need those.
This commit is contained in:
parent
803584dc7c
commit
bfd7eb2141
1 changed files with 1 additions and 1 deletions
|
|
@ -272,7 +272,7 @@
|
|||
* the whole entity is numeric (with optional underscores), or
|
||||
* the first character is alphabetic (or underscore) and the rest is
|
||||
alphanumeric (or underscore)."
|
||||
#"^([0-9_]+|[A-Za-z_][A-Za-z0-9_]*)$")
|
||||
#"^(?:[0-9_]+|[A-Za-z_][A-Za-z0-9_]*)$")
|
||||
|
||||
(defn format-entity
|
||||
"Given a simple SQL entity (a keyword or symbol -- or string),
|
||||
|
|
|
|||
Loading…
Reference in a new issue