RUBY: Please help with gsub (try2)?

You should do it in once: string/yyyy(.*)zzzz\z/, 1.

This works! Thanks! – user647345 May 9 at 4:37.

From your 1st attempt, if you change it to: string = "if(location.hostname. IndexOf( 'edition. ' ) > -1) {document.

Write('May 8, 2011 -- updated 1854 GMT (0254 HKT)');} else {document. Write('May 8, 2011 2:54 p.m. EDT');}" string.

Gsub(/^. +else. +'(.+)'.

+$/, $1) should do it.

I think they are looking for a regex lookbehind. – TheMoonMaster May 9 at 4:23 I did this in console and it returned: TypeError: can't convert nil into String from (irb):8:in `gsub'. – user647345 May 9 at 4:31 My bad.

I was in the rails console. Try this: string. Sub(/^.

+else. +'(.+)'. *$/, $1) – seph May 9 at 4:41 This works too, I like it!

– user647345 May 9 at 5:15.

Re: Help with str. > Ideally, you shouldn't have HTML entities in the database. > things like &) then you should add them outside the database.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions