Help! Please!!! :)

Hi,
I am trying to extract a address from a txt file (Emergency Pager Messages) and I’ve got to the point where I strip everything not needed in the string but I am left with this:

BURNOFF THREATENING 33 SOMEPLACE RD MONTROSE

My question is this, how do I strip everything BEFORE (which could be numerous different words) the number leaving just:

33 SOMEPLACE RD MONTROSE

And second question how can I strip everything after the number (including the number itself) leaving just:
BURNOFF THREATENING

There can be a thousand different words before the number describing the job and yer as I said I need to strip them to leave the address but also need to strip the address leaving the description only…

I hope that makes sense and I’d REALLY appreciate any pointers in the right direction…

Well, it most likely can be done, but, where is this coming from? Since you are a fireman, most likely it is some sort of RSS feed or whatever. In which there would be some formatting codes in the text. And, these would most likely be XML. Something like etc. Without a sample, it is hard to help you. Post some sample lines of the real data with a bit before and after so we can see what you are talking about. Or, show some of your code so we can adjust it. Moving blind here, help us help you…

Sponsor our Newsletter | Privacy Policy | Terms of Service