Two versions of homework

1 - using regular expression
2 - using String methods