Это регулярное выражение работает для меня:
(?:(?:todo|TODO)(?:\[[A-Z,a-z]+\-\d+\])?\s(\s*\b.*\b)*)|(?:\/\*\s*(?:todo|TODO)(?:\[[A-Z,a-z]+\-\d+\])?\s(?:(?!\*\/)[\s\S])*\*\/)
В основном он ищет следующее:
Примеры с одной строкой:
todo some very important stuff
TODO[SAOY-1376] An urgent bug fix described in the SAOY-1376
// todo some very important stuff
// TODO[SAOY-1376] An urgent bug fix described in the SAOY-1376
Многострочные примеры:
/* todo assignee or something
a very important message
another thing
*/
/* TODO[SAO-13]
* a very important message
* another thing
*/