Re: searching through a string and pulling characters

2008-08-19 Thread Sean DiZazzo
On Aug 19, 6:11 am, Wojtek Walczak <[EMAIL PROTECTED]> wrote: > On Mon, 18 Aug 2008 15:34:12 -0700 (PDT), Alexnb wrote: > > Also, on a side-note, does anyone know a very simple dictionary site, that > > isn't dictionary.com or yourdictionary.com. > > This one is my favourite:http://www.lingro.com/

Re: searching through a string and pulling characters

2008-08-19 Thread Wojtek Walczak
On Mon, 18 Aug 2008 15:34:12 -0700 (PDT), Alexnb wrote: > Also, on a side-note, does anyone know a very simple dictionary site, that > isn't dictionary.com or yourdictionary.com. This one is my favourite: http://www.lingro.com/ -- Regards, Wojtek Walczak, http://tosh.pl/gminick/ -- http://mail

Re: searching through a string and pulling characters

2008-08-19 Thread Paul Boddie
On 19 Aug, 01:11, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Mon, 18 Aug 2008 15:34:12 -0700, Alexnb wrote: > > Okay, well the point of this program is to steal from the OS X built-in > > dictionary. > > Ah, not homework, but copyright infringement. It depends what the inqu

Re: searching through a string and pulling characters

2008-08-18 Thread Steven D'Aprano
On Mon, 18 Aug 2008 15:34:12 -0700, Alexnb wrote: > Okay, well the point of this program is to steal from the OS X built-in > dictionary. Ah, not homework, but copyright infringement. > Also, on a side-note, does anyone know a very simple dictionary site, > that isn't dictionary.com or yourdicti

Re: searching through a string and pulling characters

2008-08-18 Thread Alexnb
If by "What happened when you did:" you mean dictionary.com and yourdictionary.com? Nothing, they work but screen scraping isn't medicore at best. They both work fine (yourdictionary is better for screen scraping) but. I want maybe an offline soloution. But the whole reason for the program is that

Re: searching through a string and pulling characters

2008-08-18 Thread John Machin
On Aug 19, 8:34 am, Alexnb <[EMAIL PROTECTED]> wrote: > > The number is based on the word(s) they type into my program, and then it > fetches the number that word is in the list of words and then will search > the definitions document and go to the nth def. It probably won't work, but > that is the

Re: searching through a string and pulling characters

2008-08-18 Thread Steven D'Aprano
On Mon, 18 Aug 2008 13:40:13 -0700, Alexnb wrote: > Lets say I have a text file. The contents look like this, only there is > A LOT of the same thing. > > () A registry mark given by underwriters (as at Lloyd's) to ships in > first-class condition. Inferior grades are indicated by A 2 and A 3. ()

Re: searching through a string and pulling characters

2008-08-18 Thread John Machin
On Aug 19, 8:34 am, Alexnb <[EMAIL PROTECTED]> wrote: > The number is based on the word(s) they type into my program, and then it > fetches the number that word is in the list of words and then will search > the definitions document and go to the nth def. It probably won't work, but > that is the

Re: searching through a string and pulling characters

2008-08-18 Thread Alexnb
Okay, well the point of this program is to steal from the OS X built-in dictionary. While most of the files are hidden this one is not. The "()" You saw actually looks like this: ([I][/I]) only the []'s are <'s and >'s but the forum doesn't take kindly to html. What you saw was exactly how it wi

Re: searching through a string and pulling characters

2008-08-18 Thread John Machin
On Aug 19, 6:40 am, Alexnb <[EMAIL PROTECTED]> wrote: > This is similar to my last post, Oh, goodie goodie goodie, I love guessing games! > but a little different. Here is what I would > like to do. > > Lets say I have a text file. The contents look like this, only there is A > LOT of the same th

Re: searching through a string and pulling characters

2008-08-18 Thread Wojtek Walczak
On Mon, 18 Aug 2008 21:43:43 + (UTC), Wojtek Walczak wrote: > On Mon, 18 Aug 2008 13:40:13 -0700 (PDT), Alexnb wrote: >> Now, I am talking 1000's of these. I need to do something like this. I will >> have a number, and what I want to do is go through this text file, just like >> the example. Th

Re: searching through a string and pulling characters

2008-08-18 Thread Gabriel Genellina
En Mon, 18 Aug 2008 17:40:13 -0300, Alexnb <[EMAIL PROTECTED]> escribió: > Lets say I have a text file. The contents look like this, only there is A > LOT of the same thing. > > () A registry mark given by underwriters (as at Lloyd's) to ships in > first-class condition. Inferior grades are indica

Re: searching through a string and pulling characters

2008-08-18 Thread nntpman68
Hi, Is it thousands of lines or millions of lines? If it's just a few thousands and you're not working on an embedded device with little memory you could use the brute force approach Just read the whole file in one string vaiable split everything into an array separated by '()' Now you can

Re: searching through a string and pulling characters

2008-08-18 Thread Wojtek Walczak
On Mon, 18 Aug 2008 13:40:13 -0700 (PDT), Alexnb wrote: > Now, I am talking 1000's of these. I need to do something like this. I will > have a number, and what I want to do is go through this text file, just like > the example. The trick is this, those "()'s" are what I need to match, so if > the n