LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   grep reg exp (https://www.linuxquestions.org/questions/linux-newbie-8/grep-reg-exp-855069/)

Garrett85 01-08-2011 05:01 PM

grep reg exp
 
How would I use a unix grep regular expression to find any two capital letters side by side and how would I find an expected comma in an expected spot? Thanks for any and all replies.

Tinkster 01-08-2011 05:16 PM

Quote:

Originally Posted by Garrett85 (Post 4217745)
How would I use a unix grep regular expression to find any two capital letters side by side and

Code:

egrep "[A-Z]{2}"
grep "[A-Z][A-Z]"


Quote:

Originally Posted by Garrett85 (Post 4217745)
how would I find an expected comma in an expected spot? Thanks for any and all replies.

By putting a comma in the expected spot.



Cheers,
Tink

Tinkster 01-15-2011 04:13 PM

Garret, you said in your thread that I moved to GENERAL that you
feel your course left you ill equipped to solve your quizzes.

As far as regular expressions go there are a few very good on-line
tutorials 1) 2), and if you have some money to spare I'd recommend you
get O'Reilly's "Mastering regular expressions" by Jeffrey E.F. Friedl.


Cheers,
Tink


[1] http://www.regular-expressions.info/tutorial.html
[2] http://www.zytrax.com/tech/web/regex.htm


All times are GMT -5. The time now is 06:26 PM.