[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

regular expression question

sean_n

6/22/2006 8:32:00 PM

is there a way to convert the strings "Outer" to "Inner" and "outer" to
"inner" with one regular expression?

9 Answers

Gavin Kistner

6/22/2006 9:05:00 PM

0

seannakasone@yahoo.com wrote:
> is there a way to convert the strings "Outer" to "Inner" and "outer" to
> "inner" with one regular expression?

irb(main):001:0> str = "There are both Outer and Inner Geebles."
=> "There are both Outer and Inner Geebles."
irb(main):002:0> str.gsub( /Outer|Inner/ ){ |sub| sub.downcase }
=> "There are both outer and inner Geebles."

Robert Klemme

6/22/2006 9:09:00 PM

0

seannakasone@yahoo.com wrote:
> is there a way to convert the strings "Outer" to "Inner" and "outer" to
> "inner" with one regular expression?

irb(main):001:0> repl = {"outer"=>"inner","Outer"=>"Inner"}
=> {"Outer"=>"Inner", "outer"=>"inner"}
irb(main):002:0> "outer Outer".gsub!(/outer/i) {|m| repl[m]}
=> "inner Inner"

Kind regards

robert

Gavin Kistner

6/22/2006 9:11:00 PM

0

Phrogz wrote:
> irb(main):001:0> str = "There are both Outer and Inner Geebles."
> => "There are both Outer and Inner Geebles."
> irb(main):002:0> str.gsub( /Outer|Inner/ ){ |sub| sub.downcase }
> => "There are both outer and inner Geebles."

Oops...I totally misread the question. Sorry.

Dumaiu

6/23/2006 3:23:00 AM

0

seannakasone@yahoo.com wrote:
> is there a way to convert the strings "Outer" to "Inner" and "outer" to
> "inner" with one regular expression?

-----
"String containing 'Outer' and 'outer'".gsub!( /([Oo])uter/ ) {
($1[0] - 6).chr + 'nner' }
-----

Fore!

last_permutation

1/13/2010 7:47:00 PM

0

On Jan 13, 2:22 pm, "TheZ" <T...@nospam.com> wrote:
> Aaah, look at the scum crawling out from under their rocks. It does my heart
> good to hear them come forward.

ZioNazis have no heart, the record shows. This crap in Haiti is
nothing
but a cheap PR move by ZioNazi Israel. Everybody sees through it.


>
> <last_permutat...@yahoo.com> wrote in message
>
> news:19e81a55-7339-4169-ad63-0bc1984e338e@c34g2000yqn.googlegroups.com...
> On Jan 13, 1:14 pm, "TheZ" <T...@nospam.com> wrote:
>
> > 100's of 1000's are feared dead in Haitian 7.0 earthquake disaster. Israel
> > dispatched its world class Search and Rescue Teams to help. Among them is
> > the Israeli Defense Forces search and rescue. Going from Israel as well is
> > Magen David Adom, a relief team to assist the International American Red
> > Cross.
>
> There are countless people in need right on the ZioNazi doorstep,
> ZioNazi turd.
> All they get is continued suffering & death from the wonderful
> ZioNazi.
>
> > My daughters father-in-law is also among the Haitians during this
> > disaster,
> > having arrived there a week prior to the quake. He was helping the Haitian
> > Government operating and overseeing back-hoe operations in clearing land
> > for settlement.
>
> Makes sense.  ZioNazi turds have lots of experience using heavy
> equipment
> destroying things making room for 'settlements.'

mirjam

1/16/2010 5:47:00 AM

0

Last Permutation
> > Makes sense.  ZioNazi turds have lots of experience using heavy
> > equipment
> > destroying things making room for 'settlements.'- Hide quoted text -
>
> - Show quoted text -

And what are you or your`s doing for people who went through such a
trauma?

http://www.haaretz.com/hasen/spages/11...
The Israel Defense Forces' aid mission to Haiti landed in Port-au-
Prince earlier Friday with equipment for setting up an emergency field
hospital. Around 220 soldiers and officers make up the delegation,
including 120 medical staff who will operate the hospital in the
Haitian capital.

The original plan was for the IDF to first send a Home Front Command
rescue team, followed by medical teams.

But after contact was made with Haitian authorities, the army and
Foreign Ministry decided that the Caribbean country's most pressing
need was extra medical staff. Nearly every hospital in Haiti was
destroyed in Tuesday's earthquake.

The mission includes 40 doctors, 20 paramedics and 24 nurses, as well
as medics and medical technicians. Around a third of the delegation is
made up of reservists who were called up specially for the mission.

The IDF's chief medical officer, Brig. Gen. Nachman Esh, said that
while the field hospital will largely treat trauma patients, similar
to those encountered in a war, specialists in various other fields
have also been sent.

"We expect to have to deal mainly with trauma cases, but when we
arrive there, we also expect to encounter the secondary wave of
infections and diseases, as well as the routine cases that the local
hospitals would usually deal with," Esh told Haaretz.

Over the past 12 months, the IDF's medical corps has been working to
reestablish the field hospital unit that was disbanded nine years ago
as part of cost-cutting measures.

Planes full of supplies headed to the Port-au-Prince airport on
Thursday, but they arrived faster than ground crews could unload them.
Aviation authorities had to restrict non-military flights from U.S.
airspace because they feared the planes would run out of fuel while
waiting to land.

Aid groups struggle to get supplies to Haitians

Aid workers hoping to distribute food, water and other supplies to a
shattered Port-au-Prince are warning their efforts may need more
security Friday as Haitians became increasingly desperate and
impatient for help. Hundreds of U.S. paratroopers arrived overnight to
back up the relief effort.

mirjam

mirjam

1/18/2010 5:24:00 AM

0

The Israeli Hospital will treat 500 people a day , in all hospital
departments ,
mirjam

mirjam

1/18/2010 5:05:00 PM

0

After the Medical help in the first weeks the


Israeli Flying Aid (IFA) is a non – for – profit, non governmental aid
organization which provides life saving aid to people affected by
natural and man made disasters in developing countries worldwide. IFA
provides assistance to all who are in need by distribution of relief
items, medical assistance and any other life saving methods.

http://www.israaid.org.il/member_page...
will strat doing what they are good at helping other needs .
mirjam

free press

1/30/2010 12:19:00 PM

0

On 16/01/2010 05:47, mirjam wrote:
> Last Permutation
>>> Makes sense. ZioNazi turds have lots of experience using heavy
>>> equipment
>>> destroying things making room for 'settlements.'- Hide quoted text -
>>
>> - Show quoted text -
>
> And what are you or your`s doing for people who went through such a
> trauma?
>
> http://www.haaretz.com/hasen/spages/11...
> The Israel Defense Forces' aid mission to Haiti landed in Port-au-
> Prince earlier Friday with equipment for setting up an emergency field
> hospital. Around 220 soldiers and officers make up the delegation,
> including 120 medical staff who will operate the hospital in the
> Haitian capital.
>
> The original plan was for the IDF to first send a Home Front Command
> rescue team, followed by medical teams.
>
> But after contact was made with Haitian authorities, the army and
> Foreign Ministry decided that the Caribbean country's most pressing
> need was extra medical staff. Nearly every hospital in Haiti was
> destroyed in Tuesday's earthquake.
>
> The mission includes 40 doctors, 20 paramedics and 24 nurses, as well
> as medics and medical technicians. Around a third of the delegation is
> made up of reservists who were called up specially for the mission.
>
> The IDF's chief medical officer, Brig. Gen. Nachman Esh, said that
> while the field hospital will largely treat trauma patients, similar
> to those encountered in a war, specialists in various other fields
> have also been sent.
>
> "We expect to have to deal mainly with trauma cases, but when we
> arrive there, we also expect to encounter the secondary wave of
> infections and diseases, as well as the routine cases that the local
> hospitals would usually deal with," Esh told Haaretz.
>
> Over the past 12 months, the IDF's medical corps has been working to
> reestablish the field hospital unit that was disbanded nine years ago
> as part of cost-cutting measures.
>
> Planes full of supplies headed to the Port-au-Prince airport on
> Thursday, but they arrived faster than ground crews could unload them.
> Aviation authorities had to restrict non-military flights from U.S.
> airspace because they feared the planes would run out of fuel while
> waiting to land.
>
> Aid groups struggle to get supplies to Haitians
>
> Aid workers hoping to distribute food, water and other supplies to a
> shattered Port-au-Prince are warning their efforts may need more
> security Friday as Haitians became increasingly desperate and
> impatient for help. Hundreds of U.S. paratroopers arrived overnight to
> back up the relief effort.
>
> mirjam
Could you please ask the Doctors to leave the deseased bodies
organs intact no robbing vital organs please