Thanks user, that works now
Bash regex help please
Why would one not want to use grep in ERE or Perl mode? Why aren't either the default?
I think you can just backslash escape the question marks too. Same for plusses.
Yeah, came across that while googling about ERE. Would be annoying to have to escape even more stuff
something something legacy retarded bullshit. if it makes you feel better, there isn't a performance cost to using -E in GNU grep. it's the same engine, but the parser just handles escapes different and has more qualifiers.
oops. ya i forgot how gnu grep does that. like I just said. BRE and ERE mode in GNU grep are basically the same, the differences are like magic modes in vim. mostly escaping related.
I think I'm just going to add alias grep='grep -E' to my .bashrc anyway
just remember to note that when scripting.
Yeah, I figure I'll explicitly do grep -E in scripts and just grep when I'm just entering a command
bump for more comfy bash discussion