fn mkEx(s) := '/^' + s + '$/;'; {. TODO: insert \zs at precise identifier! https://stackoverflow.com/a/31089753/11296354 fn processStr(s) := let val line := split s /[ \(:]+/ val outLine := sprintf '%s\t%s\t%s' (line.3 . fp . mkEx s) in outLine end; processStr¨{%/fn +[[:lower:]][[:latin:]]*.*:=/}{`0}