Return all substrings that matches given regular expression pattern

regex:find(STRING regex_pattern
, STRING subject) : ARRAY

regex:find('/(h|i)/','hi')
#=> [
#=>     "h",
#=>     "h"
#=> ]

regex:find('/i/','ho')
#=> [
#=> 
#=> ]

# when you have a group 
regex:find('/good (bye|hi)/','good bye')
#=> [ "good bye", "bye" ]

Copyright ©2013-2022 SunSed®. All rights reserved.