grep: relating verbatim "+"


i need occurrences "(+)" sql scripts, (i.e., seer outdoor join expressions). realizing "+", "(", ")" special regex characters, i tried:




grep "\(\+\)" *


now does relapse occurrences "(+)", nonetheless lines well. (seemingly anything open tie parens same line.) recalling parens wholly special extended grep, i tried:




grep "(\+)" *
grep "(\\+)" *


both returned wholly lines enclose "()". presumption "+" can't escaped, i attempted an aged trick:




grep "([+])" *


that works. i cross-checked outcome non-regex tool.



question: someone explain accurately going "+" character? there reduction kludgy proceed review "(+)"?



(i am controlling cygwin grep command.)



edit: interjection solutions. -- i that, per gnu grep authority bruno referenced, "\+" used basic countenance gives "+" the extended meaning, therefore matches one-or-more "("s followed ")". files that's always "()".



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?