[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: Finding un-escaped characters in scan

Todd Benson

7/28/2007 1:22:00 PM

On 7/28/07, Fred Phillips <fophillips1990@gmail.com> wrote:
> I have a string that looks like this: "test,,\,test". And I'm trying to
> count the commas which don't follow a \. But when using scan(/[^\\],/) it
> only finds the first comma. I think this is because after scan() has found a
> comma without a backslash, it continues from where it left off, and since
> there's no character before the next comma, it won't match it. Does anyone
> know how to fix it?
>

Works for me:

irb(main):001:0> "test,,\,test".scan(/[^\\],/)
=> ["t,", ",,"]

Todd

14 Answers

Todd Benson

7/28/2007 2:24:00 PM

0

On 7/28/07, Fred Phillips <fophillips1990@gmail.com> wrote:
> Hmm, it appears I made a typo in my actual code. But this still isn't the
> result I want.
>
> For instance "test,,test" only returns one comma. And the results you have
> shown above, are returning the wrong number as well.
>

Fred:

Ah, I see what you are saying in your original post.

"test,,test".scan(/.,/)
=> ["t,"]

It should find ",," too, right?

Interesting behavior and has nothing to do with backslashes, just the
fact that scan won't find it if the character is adjacent to itself.
Like you said, where it starts the next scan, maybe. I'm not sure how
to get around it without playing around a bit.

Todd

Yoorghis

12/10/2010 2:58:00 AM

0

On Thu, 9 Dec 2010 07:31:44 -0800 (PST), Rick Saunders
<retro_lad@yahoo.com> wrote:

>> oh, c'mon, now.
>> are you or are you not cleverly trying to justify the war in iraq?
>
>No, I'm shelling other posters for making wild-assed
>claims that, when pressed to back up with facts, results
>in their meltdown into the usual left-wing hysteria and
>name-calling.

THe real question is why in fuck don't YOU have that knowledge?

This isn't a secret.

You'd be whining if Wilson had made a speech saying, word for word,
exactly what he wrote in an op-ed piece---claiming "You can't cite it"

WIlson explains why he wrote the op ed piece

The juxtapositon is that he was Sent by Bush to Niger

He submited a report directly opposite what Bush subsequently publicly
claimed

Did you think that Wilson's "first" act was to rush to the papers?

Even you can't be stupid enough to argue that silly crap

What Wilson (logically and actually) did was to go to the State
department and ask: "what the fuck are you guys doing---that's not
what my report said".

Logically, when he was told that they would not counter bush---he was
told to "write an op-ed piece"

You're in a fucking snit because based on all logic---that's exactly
what took place

You can't deny it, you can't offer counter rebuttal---your ONLY
childish behavior is demand a cite.

Rick Saunders

12/10/2010 4:24:00 AM

0

On Dec 9, 9:50 pm, Yoorg...@Jurgis.net wrote:

> NIGER HAD NO YELLOW CAKE TO SELL

Oh, for fuck's sake. So, according to you, since bananas
don't grow in Kansas, it's impossible to have a banana split
in Topeka? (Now watch, everyone, as he pretends to
misunderstand the analogy.) Is is *just possible* that
something not in a country could be *brought* there?

Can you at least admit that Wilson had been sent by the
CIA to investigate British intelligence claims that Saddam
was trying to buy yellowcake uranium in Niger?

Why do you think the intelligence agencies of two
countries found the claims worthy of investigation? Hint:
it has something to do with what Wilson said in his book
about his conversation with the unnamed Niger official in
2002 regarding uranium. Oh, dear... this requires you to
actually do some research. And to think. You up to it?
I doubt it.

Ernst Blofeld

12/10/2010 7:12:00 AM

0


> >So, according to you, since bananas don't grow in
> > Kansas, it's impossible to have a banana split in Topeka? (Now watch,
> > everyone, as he pretends to misunderstand the analogy.) Is is *just
> > possible* that something not in a country could be *brought* there?

The swallow may fly south with the sun or the house martin or the
plover may seek warmer climes in winter, yet these are not strangers
to our land?

It's fucking Africa. The region is not noted for its high standards of
public official honesty, nor for its freedom from non-state actors who
can do things behind the scenes. With enough cash you can get whatever
you want, and Iraq had plenty of cash.

So did Libya, and they got undeclared yellowcake from Niger, despite
claims of the impossibility of that in this very thread. The Libyan
nuclear program was dismantled in the wake of the Iraq war, and the
discoveries from that program included information about how they
obtained yellowcake. It was from, surprise, Niger.

Financial Times:
http://www.mail-archive.com/sam11@erols.com/msg...
--
The FT has now learnt that three European intelligence services were
aware
of possible illicit trade in uranium from Niger between 1999 and 2001.
Human
intelligence gathered in Italy and Africa more than three years before
the
Iraq war had shown Niger officials referring to possible illicit
uranium
deals with at least five countries, including Iraq.

This intelligence provided clues about plans by Libya and Iran to
develop
their undeclared nuclear programmes. Niger officials were also
discussing
sales to North Korea and China of uranium ore or the "yellow cake"
refined
from it: the raw materials that can be progressively enriched to make
nuclear bombs.

The raw intelligence on the negotiations included indications that
Libya was
investing in Niger's uranium industry to prop it up at a time when
demand
had fallen, and that sales to Iraq were just a part of the clandestine
export plan. These secret exports would allow countries with
undeclared
nuclear programmes to build up uranium stockpiles.

One nuclear counter-proliferation expert told the FT: "If I am going
to make
a bomb, I am not going to use the uranium that I have declared. I am
going
to use what I acquire clandestinely, if I am going to keep the
programme
hidden."

This may have been the method being used by Libya before it agreed
last
December to abandon its secret nuclear programme. According to the
IAEA,
there are 2,600 tonnes of refined uranium ore - "yellow cake" - in
Libya.
However, less than 1,500 tonnes of it is accounted for in Niger
records,
even though Niger was Libya's main supplier.

Information gathered in 1999-2001 suggested that the uranium sold
illicitly
would be extracted from mines in Niger that had been abandoned as
uneconomic
by the two French-owned mining companies - Cominak and Somair, both of
which
are owned by the mining giant Cogema - operating in Niger.

"Mines can be abandoned by Cogema when they become unproductive. This
doesn't mean that people near the mines can't keep on extracting," a
senior
European counter-proliferation official said.

He added that there was no evidence the companies were aware of the
plans
for illicit mining.
--

Global Security:
http://www.globalsecurity.org/wmd/world/libya/n...
--
Once inspections began after Quadafi's December 2003 decision to
disarm, it was confirmed that Libya did obtain "yellow cake" from
Niger in 1978, as U.S. Intelligence had long believed.
....
Qadhafi sought help in obtaining nuclear technology from a number of
countries, including the People's Republic of China. Among these
efforts, the cooperation with Pakistan launched in 1977 seemed for a
time to be producing material results. Libya appeared to be providing
financial assistance and, later, deliveries of uranium "yellow cake"
originating in Niger in the hope of eventually being compensated by
weapons from Pakistan.
--

big john whine

12/10/2010 4:38:00 PM

0

On Dec 9, 10:24 pm, Rick Saunders <retro_...@yahoo.com> wrote:
> On Dec 9, 9:50 pm, Yoorg...@Jurgis.net wrote:
>
> > NIGER HAD NO YELLOW CAKE TO SELL
>
> Oh, for fuck's sake. So, according to you, since bananas
> don't grow in Kansas, it's impossible to have a banana split
> in Topeka? (Now watch, everyone, as he pretends to
> misunderstand the analogy.) Is is *just possible* that
> something not in a country could be *brought* there?
>
> Can you at least admit that Wilson had been sent by the
> CIA to investigate British intelligence claims that Saddam
> was trying to buy yellowcake uranium in Niger?
>
> Why do you think the intelligence agencies of two
> countries found the claims worthy of investigation? Hint:
> it has something to do with what Wilson said in his book
> about his conversation with the unnamed Niger official in
> 2002 regarding uranium. Oh, dear... this requires you to
> actually do some research. And to think. You up to it?
> I doubt it.

how much do you eigh, saunders?

big john whine

12/10/2010 4:39:00 PM

0

On Dec 9, 10:24 pm, Rick Saunders <retro_...@yahoo.com> wrote:
> On Dec 9, 9:50 pm, Yoorg...@Jurgis.net wrote:
>
> > NIGER HAD NO YELLOW CAKE TO SELL
>
> Oh, for fuck's sake. So, according to you, since bananas
> don't grow in Kansas, it's impossible to have a banana split
> in Topeka? (Now watch, everyone, as he pretends to
> misunderstand the analogy.) Is is *just possible* that
> something not in a country could be *brought* there?
>
> Can you at least admit that Wilson had been sent by the
> CIA to investigate British intelligence claims that Saddam
> was trying to buy yellowcake uranium in Niger?
>
> Why do you think the intelligence agencies of two
> countries found the claims worthy of investigation? Hint:
> it has something to do with what Wilson said in his book
> about his conversation with the unnamed Niger official in
> 2002 regarding uranium. Oh, dear... this requires you to
> actually do some research. And to think. You up to it?
> I doubt it.

your assertions require some knowledge of how many angels can dance on
the head of a pinhead.

big john whine

12/10/2010 4:42:00 PM

0

On Dec 10, 1:11 am, Ernst Blofeld <blofel...@hotmail.com> wrote:
> > >So, according to you, since bananas don't grow in
> > > Kansas, it's impossible to have a banana split in Topeka? (Now watch,
> > > everyone, as he pretends to misunderstand the analogy.) Is is *just
> > > possible* that something not in a country could be *brought* there?
>
> The swallow may fly south with the sun or the house martin or the
> plover may seek warmer climes in winter, yet these are not strangers
> to our land?
>
> It's fucking Africa. The region is not noted for its high standards of
> public official honesty, nor for its freedom from non-state actors who
> can do things behind the scenes. With enough cash you can get whatever
> you want, and Iraq had plenty of cash.
>
> So did Libya, and they got undeclared yellowcake from Niger, despite
> claims of the impossibility of that in this very thread. The Libyan
> nuclear program was dismantled in the wake of the Iraq war, and the
> discoveries from that program included information about how they
> obtained yellowcake. It was from, surprise, Niger.
>
> Financial Times:
> http://www.mail-archive.com/sa...@erols.com/msg...
> --
> The FT has now learnt that three European intelligence services were
> aware
> of possible illicit trade in uranium from Niger between 1999 and 2001.
> Human
> intelligence gathered in Italy and Africa more than three years before
> the
> Iraq war had shown Niger officials referring to possible illicit
> uranium
> deals with at least five countries, including Iraq.
>
> This intelligence provided clues about plans by Libya and Iran to
> develop
> their undeclared nuclear programmes. Niger officials were also
> discussing
> sales to North Korea and China of uranium ore or the "yellow cake"
> refined
> from it: the raw materials that can be progressively enriched to make
> nuclear bombs.
>
> The raw intelligence on the negotiations included indications that
> Libya was
> investing in Niger's uranium industry to prop it up at a time when
> demand
> had fallen, and that sales to Iraq were just a part of the clandestine
> export plan. These secret exports would allow countries with
> undeclared
> nuclear programmes to build up uranium stockpiles.
>
> One nuclear counter-proliferation expert told the FT: "If I am going
> to make
> a bomb, I am not going to use the uranium that I have declared. I am
> going
> to use what I acquire clandestinely, if I am going to keep the
> programme
> hidden."
>
> This may have been the method being used by Libya before it agreed
> last
> December to abandon its secret nuclear programme. According to the
> IAEA,
> there are 2,600 tonnes of refined uranium ore - "yellow cake" - in
> Libya.
> However, less than 1,500 tonnes of it is accounted for in Niger
> records,
> even though Niger was Libya's main supplier.
>
> Information gathered in 1999-2001 suggested that the uranium sold
> illicitly
> would be extracted from mines in Niger that had been abandoned as
> uneconomic
> by the two French-owned mining companies - Cominak and Somair, both of
> which
> are owned by the mining giant Cogema - operating in Niger.
>
> "Mines can be abandoned by Cogema when they become unproductive. This
> doesn't mean that people near the mines can't keep on extracting," a
> senior
> European counter-proliferation official said.
>
> He added that there was no evidence the companies were aware of the
> plans
> for illicit mining.
> --
>
> Global Security:http://www.globalsecurity.org/wmd/world/libya/n...
> --
> Once inspections began after Quadafi's December 2003 decision to
> disarm, it was confirmed that Libya did obtain "yellow cake" from
> Niger in 1978, as U.S. Intelligence had long believed.
> ...
> Qadhafi sought help in obtaining nuclear technology from a number of
> countries, including the People's Republic of China. Among these
> efforts, the cooperation with Pakistan launched in 1977 seemed for a
> time to be producing material results. Libya appeared to be providing
> financial assistance and, later, deliveries of uranium "yellow cake"
> originating in Niger in the hope of eventually being compensated by
> weapons from Pakistan.
> --

have alittle whine with that yellowcake?
and do you ha ha NOW believe that the iraq invasion was justified?
(i know what a skeptic you've been all these years....)

hahahhaha
jajajajajja
hahahahha
jajajajjajajja
hahahhahaha
jajajajaja
ahaha
jajajajjaja
hahahahahha
jajajajajajajajaja

woo hoo

Ernst Blofeld

12/11/2010 1:30:00 AM

0

On Dec 10, 8:41 am, john whine <john.wh...@gmail.com> wrote:

> have alittle whine with that yellowcake?
> and do you ha ha NOW believe that the iraq invasion was justified?

Apparently you believe that if you opposed the Iraq war, that gives
you the right to lie about other stuff, including the details of
Wilson's visit to Niger.

I disagree.

Rick Saunders

12/11/2010 4:35:00 AM

0

On Dec 10, 11:37 am, john whine <john.wh...@gmail.com> wrote:
> On Dec 9, 10:24 pm, Rick Saunders <retro_...@yahoo.com> wrote:
>
>
>
>
>
> > On Dec 9, 9:50 pm, Yoorg...@Jurgis.net wrote:
>
> > > NIGER HAD NO YELLOW CAKE TO SELL
>
> > Oh, for fuck's sake. So, according to you, since bananas
> > don't grow in Kansas, it's impossible to have a banana split
> > in Topeka? (Now watch, everyone, as he pretends to
> > misunderstand the analogy.) Is is *just possible* that
> > something not in a country could be *brought* there?
>
> > Can you at least admit that Wilson had been sent by the
> > CIA to investigate British intelligence claims that Saddam
> > was trying to buy yellowcake uranium in Niger?
>
> > Why do you think the intelligence agencies of two
> > countries found the claims worthy of investigation? Hint:
> > it has something to do with what Wilson said in his book
> > about his conversation with the unnamed Niger official in
> > 2002 regarding uranium. Oh, dear... this requires you to
> > actually do some research. And to think. You up to it?
> > I doubt it.
>
> how much do you eigh, saunders?

I guess... I guess it depends on what the meaning of "eigh" is.
And I guess none of the libs here are gonna do some research,
let alone think. All you lot can do is whine, call names, and wave
hands.

Rick Saunders

12/11/2010 4:39:00 AM

0

On Dec 9, 11:53 pm, "5847 Dead, 990 since 1/20/09" <d...@gone.com>
wrote:
> On Thu, 09 Dec 2010 20:24:07 -0800, Rick Saunders wrote:
> > On Dec 9, 9:50 pm, Yoorg...@Jurgis.net wrote:
>
> >> NIGER HAD NO YELLOW CAKE TO SELL
>
> > Oh, for fuck's sake. So, according to you, since bananas don't grow in
> > Kansas, it's impossible to have a banana split in Topeka? (Now watch,
> > everyone, as he pretends to misunderstand the analogy.) Is is *just
> > possible* that something not in a country could be *brought* there?
>
> Why would anyone export a controlled substance like that to Niger?

Are you actually as stupid as that, cupcake? Why would anyone
export *any controlled substance to a relatively lawless place? Why
does anyone export cocaine, or heroin, or to anywhere?

Money. Power. Or both. Christ, you're thick.