I want to create a pattern for sed, which will find out 'type="" For this I tried to use the pattern
type=".*\?"
echo 'aa type="none" stretchChildren="first"' | sed s/'type=".*\?"'/hello/
Above is the sed command which prints
aa hello
Which means it selects 'type="none" stretchChildren="first"' for 'type=".*\?"'
Now below is the grep command using same pattern on same string
echo 'aa type="none" stretchChildren="first"' | grep -oP 'type=".*?"'
It gives output
type="none"
Don't know what I am missing in sed pattern
Can some one help me out here Output of sed should be
aa hello stretchChildren="first"