Final remarks
Regular expressions are hard. What makes this even harder on Linux is that regular expressions have been implemented by different programs (which have different maintainers, with different opinions) slightly differently.
To make matters worse, some features of regular expressions have been hidden as extended regular expressions by some programs, whereas they are considered the default by other programs. In past years, the maintainers of these programs seemed to have moved towards a more global POSIX standard for regular regular expressions and extended regular expressions, but still to this day, there are some discrepancies.
We have some very simple advice for dealing with this: just try it out. You might not remember what the asterisk represents in globbing, as opposed to regular expressions, or why the question mark does something different. Perhaps you'll forget to 'activate' extended syntax with -E
, and your extended search pattern will return weird errors.
You will definitely...