How to extract text from a string using sed?

The Solution to How to extract text from a string using sed? is


How about using grep -E?

echo "This is 02G05 a test string 20-Jul-2012" | grep -Eo '[0-9]+G[0-9]+'

~ Answered on 2012-07-19 20:42:43


Most Viewed Questions: