Please try:
preg_match('/^[^\>]*\>(.*)\*.*$/', $line, $matches);
021 wrote:
> the log file is from a radio playlist:
>
> TIME > ARTIST - TITLE *SONG_CATEGORY
>
> for example
>
> 17:12:26 > THE CURE - ALT.END *NEW
>
> the values before > and after * are changing, hope there's a simple
> soluti
the log file is from a radio playlist:
TIME > ARTIST - TITLE *SONG_CATEGORY
for example
17:12:26 > THE CURE - ALT.END *NEW
the values before > and after * are changing, hope there's a simple
solution for this
thanx
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: ht
Hi,
021 wrote:
> $lines = file('sometext.txt');
> for ($i = 0, $j = count($lines); $i <=1; $i++) {
> print $lines[$j - $i];
> }
> ?>
For a start, try this instead:
$lines = file('sometext.ext');
$last = end($lines);
Secondly, do you have an example of the real log file?
Cheers,
David Grant
Hi,
need some help with this one
i made a page which is reading the last line from a log file. the log is
formatted like this:
text1 > MAIN TEXT *text2
i need to get only the MAIN TEXT part, i don't need the text1 > and *text2
i'm using this code
thanx
--
PHP General Mailing List (http:/
4 matches
Mail list logo