I’m stuck with a bit of php code, I am getting information of a site which has information inside brackets, the problem is I only want the information infront of the brackets, since the content of the brackets can be anything I am confused what to do…
preg_match_all('/<title>FlightAware >(.*?) <\/title>/ms', $title, $airports, PREG_SET_ORDER);
this is what I have the actual title is: FlightAware > London Heathrow Airport (London, England) EGLL / LHR Flug-Tracker
All I would like from that is the “London Heathrow Airport”… any ideas?
If it’s stored as
You could try
Which should give you just
London Heathrow Airport. You’ll haveLondon, Englandin the second match parameter, andEGLL / LHR Flug Tracker-in the third match parameter. Granted, this is only if that is the EXACT format each one is stored in.Also, work on your accept rating.