4 ms·
Matching an arbitrary string with '*' is not a regular expression - it's a shell glob pattern. Different thing entirely. Maybe they should be the same thing, ye
by camtarn 4y ago
Matching an arbitrary string with '*' is not a regular expression - it's a shell glob pattern. Different thing entirely. Maybe they should be the same thing, yes.
And although I don't know for sure, reusing a matched pattern within the regex string using (1) seems like it would be very strange, because () are metacharacters for grouping.
- TuringTest 4y agoThey are valid patterns in MS Word and Notepad++ search and replace, though. (Word uses parentheses to create the group then \1 to reuse it in the replacement string, while Notepad uses $1). That's what I meant about every system using a different syntax for what's basically the same functionality.