SyntaxFix
Write A Post
Hire A Developer
Questions
How about using grep -E?
grep -E
echo "This is 02G05 a test string 20-Jul-2012" | grep -Eo '[0-9]+G[0-9]+'