elof
4/11/2008 10:21:00 AM
Hi
On Fri, 11 Apr 2008 19:05:47 +0900, John Butler <johnnybutler7@gmail.com>
wrote:
> Hi,
>
> Ive looked about and found some ways to do this but there must be a 1
> line quick way in ruby using regular expressions or something.
>
> Basically i have a string "Test" and i want to see if it matches 3
> constants that i have defined. If it does then i want to go route a,
> and if it doesnt i want to go route b, so:
>
> If "Test" (matches either of the following) string1, string2, string3
> route a
> else
> route b
> end
>
> Anyone know the quick way?
This looks like a potential Ruby Quiz challenge.
Kristian