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
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
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
----- Original Message -----
From: "John Butler" <johnnybutler7@gmail.com>
Newsgroups: comp.lang.ruby
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Sent: Friday, April 11, 2008 7:05 PM
Subject: Match string from possible strings
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
I am currently looking for Ruby on Rails Web Developers for a permanent
and a contract opportunity based in London. If you are interested in
this opportunity, please feel free to contact me. Alternatively, if this
is not of interest to you but you have any friends or colleagues who are
looking for either Ruby on Rails work or indeed any other roles within
the IT field, please feel free to pass their details on to me or pass my
details to them.
Hi,
From: "John Butler" <johnnybutler7@gmail.com>
Newsgroups: comp.lang.ruby
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Sent: Friday, April 11, 2008 7:05 PM
Subject: Match string from possible strings
I saw a presentation on facets @ the Hartford rug a few weeks ago and I
thoroughly enjoy this gem now.
···
-----Original Message-----
From: list-bounce@example.com [mailto:list-bounce@example.com] On Behalf
Of John Butler
Sent: Friday, April 11, 2008 8:44 AM
To: ruby-talk ML
Subject: Re: Match string from possible strings
Park Heesob wrote:
Hi,
----- Original Message -----
From: "John Butler" <johnnybutler7@gmail.com>
Newsgroups: comp.lang.ruby
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Sent: Friday, April 11, 2008 7:05 PM
Subject: Match string from possible strings