Regex - Can you return the matched pattern using sub?

Furthermore, is there an alternative to match_pattern that returns all matches for a pattern?

It would probably help if I could more better documentation about regex functions in Zeek… I have this: but if anybody could recommend more resources it would be appreciated.