There is a way to do this with sed. Let's say your RE was [a-z]. If you wanted to find 1 or more occurances of this on a line, then you would use something like:
sed -n '/[a-z][a-z]*/p' file
This basically says show me one occurance of a-z then zero or more occurances of a-z. Sed does not have extended regular expressions like egrep or awk where you can use the parenthesis to group a regular expression. The parenthesis in sed are used for alteration, which remembers the characters the RE matched. Sed also does not support the "+" sign to mean 1 or more. Sorry for the delayed response,
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.