Mickie D
01-23-2017, 02:11 PM
Hi guys,
I have a text file that I am trying to import into vbulletin to display
I have managed to make the backend that actually puts the information into vbulletin (my template).
But I am having problem with the PREG match and the output
basically the txt files I am using have allot of crap in them and I am trying to weed out the good bits
Example of text file
Anson Road, London, N7 0AA
Anson Road, London, N7 0AB
Huddleston Road, London, N7 0AD
Huddleston Road, London, N7 0AE
London, N7 0AF (No Longer In Use)
Huddleston Road, London, N7 0AG
St Georges Avenue, London, N7 0AH
St Georges Avenue, London, N7 0AJ
Archibald Road, London, N7 0AL
Archibald Road, London, N7 0AN
Huddleston Road, London, N7 0AP
London, N7 0AQ (No Longer In Use)
Anson Road, London, N7 0AR
Anson Road, London, N7 0AS
Anson Road, London, N7 0AT
Anson Road, London, N7 0AU
London, N7 0AW (No Longer In Use)
Anson Road, London, N7 0AX
London, N7 0AY (No Longer In Use)
London, N7 0AZ (No Longer In Use)
London, N7 0BA (No Longer In Use)
London, N7 0BB (No Longer In Use)
Rowstock Gardens, London, N7 0BD
Rowstock Gardens, London, N7 0BE
Holbrooke Court, London, N7 0BF
Rowstock Gardens, London, N7 0BG
Rowstock Gardens, London, N7 0BH
using preg match I just want to grab the road names, without the London and the postcodes (N7 OBH)
So I would like the preg replace to cycle each line and remove everything that is not a road name.
LEAVING THIS:
Anson Road
Rowstock Gardens
Holbrooke
St Georges Avenue
being completely honest I do not even know where to start with preg replace I am losing my mind here
Cheers All
Mick
I have a text file that I am trying to import into vbulletin to display
I have managed to make the backend that actually puts the information into vbulletin (my template).
But I am having problem with the PREG match and the output
basically the txt files I am using have allot of crap in them and I am trying to weed out the good bits
Example of text file
Anson Road, London, N7 0AA
Anson Road, London, N7 0AB
Huddleston Road, London, N7 0AD
Huddleston Road, London, N7 0AE
London, N7 0AF (No Longer In Use)
Huddleston Road, London, N7 0AG
St Georges Avenue, London, N7 0AH
St Georges Avenue, London, N7 0AJ
Archibald Road, London, N7 0AL
Archibald Road, London, N7 0AN
Huddleston Road, London, N7 0AP
London, N7 0AQ (No Longer In Use)
Anson Road, London, N7 0AR
Anson Road, London, N7 0AS
Anson Road, London, N7 0AT
Anson Road, London, N7 0AU
London, N7 0AW (No Longer In Use)
Anson Road, London, N7 0AX
London, N7 0AY (No Longer In Use)
London, N7 0AZ (No Longer In Use)
London, N7 0BA (No Longer In Use)
London, N7 0BB (No Longer In Use)
Rowstock Gardens, London, N7 0BD
Rowstock Gardens, London, N7 0BE
Holbrooke Court, London, N7 0BF
Rowstock Gardens, London, N7 0BG
Rowstock Gardens, London, N7 0BH
using preg match I just want to grab the road names, without the London and the postcodes (N7 OBH)
So I would like the preg replace to cycle each line and remove everything that is not a road name.
LEAVING THIS:
Anson Road
Rowstock Gardens
Holbrooke
St Georges Avenue
being completely honest I do not even know where to start with preg replace I am losing my mind here
Cheers All
Mick