Hi, I'm trying to extract a string using 'ereg()' but it doesn't seem
to find some strings. I am using php version 4.3.10 in cli mode.
Here is an example of the input:
#include FT_FREETYPE_H
#include stdio.h
#include freetype/freetype.h
Here is a snip of my code:
$line = fgets($fp);
$line =
Richard Lynch wrote:
KHS wrote:
Here is an example of the input:
#include FT_FREETYPE_H
#include stdio.h
#include freetype/freetype.h
Here is a snip of my code:
$line = fgets($fp);
$line = trim($line);
$regexp = '^#include(:? | | )([^ ]+)[ ]';
//$regexp = '^#include( | | )[^ ]+[ ]'; //Same
2 matches
Mail list logo