learnbyexample
Interests: Regular Expressions, Linux CLI one-liners, Scripting Languages and Vim
- 16 Posts
- 2 Comments
Joined 2 years ago
Cake day: June 20th, 2023
You are not logged in. If you use a Fediverse account that is able to follow users, you can follow this user.
Regex syntax and features vary between implementations.
\d
isn’t supported by BRE/ERE flavors.GNU grep
supports PCRE, so you can usegrep -oP '/dev/loop\d'
orgrep -o '/dev/loop[0-9]'
if you are matching only one digit character.
Why would it print the colon?