miniblog.

← Back to all posts
31
When a tool supports both regular expressions and literal strings, which should be the default? If you default to regex, users can match more strings than they realise (e.g. `foo.txt`) or less (e.g. `foo(bar)`). I typically see regex as the default, but I prefer the opposite.

1 Comment

@wilfredh Thinking of places I use regex the most, Sublime Text and Visual Studio support regexes in search/replace fields but both default to not using them by default. Which makes some sense, lesser surprises when you search for some function calls like `foo(`