Ruby:Checking for a Suffix

From Progzoo
Jump to navigation Jump to search

We use a regular expression match with the $ metacharacter, which matches the end of the string.

The code selects those countries that end with "land".

[Font] [Default] [Show] [Resize] [History] [Profile]