Skip to main content
5 events
when toggle format what by license comment
Oct 13, 2021 at 10:06 comment added Kusalananda @ilkkachu Hm. Yes. I'm getting the quoting rules confused. In any case, the use of backslashes within [...] is obviously not doing what the user thinks they do.
Oct 13, 2021 at 10:03 comment added ilkkachu @they, no, double-quotes leave the backslashes except in front of the few characters that are special within double-quotes. (dquotes, backslashes, dollars and backticks, I think.) "\." is the same as '\.' or \\., but of course "\$" removes the backslash and is the same as '$' or \$. The dash might be suspect though, I'm not sure you can escape it inside brackets in BRE. (Perl-style regexes are different.) If I didn't get lost in the negations, I think that command accepts the backslash the same as letters, but not the dash. '^[-a-z0-9./_áéíóúñ]*$' might be better.
Oct 13, 2021 at 9:48 comment added Kusalananda Note that within a double-quoted string, things like \., \/, and \- expands to ., /, and -. Note also that the - then probably defines a range of characters between _ and á, which may not make sense. Also, the \ character itself is literal within [...], as are . and /.
Oct 12, 2021 at 22:20 history edited Frédéric Loyer CC BY-SA 4.0
added 1 character in body
Oct 12, 2021 at 22:15 history answered Frédéric Loyer CC BY-SA 4.0