You are here: Regex nightmares « PHP « IT news, forums, messages
Regex nightmares

Posted by W Luke on 05/23/05 18:43

Hi,

I really struggle with regex, and would appreciate some guidance.
Basically, I have a whole load of files (HTML) which are updated every
few minutes. I need to go through each line, looking for the word
CONFIRMED: (which is always in capitals, and always superseded by a
colon). The line looks like this:

22.5 J.Smith at Thropton, CONFIRMED: more text here, including commas
and info on the appointment etc

There are other similar appointments that haven't yet been confirmed,
so..I just need to pick out the confirmed ones. Once the regex finds
"CONFIRMED:" I also need it to grab the text up to and including the
date (22.5). I don't really need any text *after* "CONFIRMED:" yet,
but possible in the future.

There seem to be a lot of tutorials on, eg, getting hrefs from anchor
tags, but I can't get my head around this particular one. Any ideas
or pointers would be great

Cheers

Will

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация