Last active
February 6, 2024 16:22
Revisions
-
nklatt revised this gist
Feb 6, 2024 . No changes.There are no files selected for viewing
-
nklatt created this gist
Feb 6, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ <input pattern="/^(?:(\d+\/[1-9]\d*)|(\d*(?:(\s\d+\/[1-9]\d*)|\.\d+)?))$/"> <!-- (?: => non-capturing group, EITHER (\d+\/[1-9]\d*) => any number of digits followed by a slash then any number of digits not beginning with 0 (fraction) | => OR (\d*(?: => zero or more digits followed by non-capturing group, EITHER ( \s => a space \d+ => any number of digits \/ => a slash [1-9]\d* => one or more digits not beginning with 0 ) => (fraction OR whole + fraction) | => OR \.\d+ => a decimal point followed by any number of digits (float) )?) => zero or one match for that non-capturing group ) -->