Skip to content

Commit c4765d3

Browse files
authored
Update README.md
alphabet != letter. this has been bugging me for so long
1 parent 20c1fdb commit c4765d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ $ wgo run -file .html -file .css main.go
143143

144144
Technically the dot `.` matches any character, but file extensions are such a common pattern that wgo includes a slight modification to the regex matching rules:
145145

146-
*Any dot `.` immediately followed by an alphabet `[a-zA-Z]` is treated as a dot literal i.e. `\.`*
146+
*Any dot `.` immediately followed by a letter `[a-zA-Z]` is treated as a dot literal i.e. `\.`*
147147

148-
So `.css` really means `\.css`, but `.*` still means `.*` because `*` is not an alphabet. If you really want to use the dot `.` wildcard followed by an alphabet, wrap it in (a bracket group) so that it is not immediately followed by an alphabet i.e. `(.)abc`.
148+
So `.css` really means `\.css`, but `.*` still means `.*` because `*` is not a letter. If you really want to use the dot `.` wildcard followed by a letter, wrap it in (a bracket group) so that it is not immediately followed by a letter i.e. `(.)abc`.
149149

150150
## Including and excluding directories
151151

0 commit comments

Comments
 (0)