var = /\A([aeiou]*)(.*)\z/.match("apple")
This code regex will create an array with the first part is any length of vowel and the rest of the characters.
var[0] = "apple"
var[1] = "a"
var[2] = "pple"
This code regex will create an array with the first part is any length of vowel and the rest of the characters.
var[0] = "apple"
var[1] = "a"
var[2] = "pple"
Comments
Post a Comment