Mega Code Archive

 
Categories / Ruby / Development
 

You can also specify repetition within patterns

/ab+c/ matches a string containing an a followed by one or more b's, followed by a c.  /ab*c/ matches one a, zero or more b's, and one c.