Pick out the text between square brackets

From MyWiki
Jump to: navigation, search

echo "test [test1] test" | grep -Po "(?<=\[).*?(?=\])"