in reply to Extracting a substring according to some criteria

Do you want us to do your homework? ;-) Show us some code and most monks will be more than willing to solve any problem you encountered.

s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e