How can I iterate over multi-line regexp matches using sed and bash? I'm trying to generate some quick docs from comments in a file, like so:
/**
* @name myFun
* @return {int}
*/
I can extract every comment block using sed -n -e '/\/\*\*$/,/\*\/$/p'
, but now I'd like to stuff each match into a bash array so I can parse the details later.
Thanks.