Link to home
Start Free TrialLog in
Avatar of bibabutze
bibabutze

asked on

preg_match problem with line breaks

Hello Experts,

I´m using the following preg_match expression:

if (preg_match("/^FULLTEXT:(.*)",$description,$descarr))

to filter a variable called $description.

The following works fine:

$description = "FULLTEXT: Hello World, i´m a text";

As soon as i use line breaks, the preg_match does not work any more... e.g.
$description = "FULLTEXT: Hello World, i´m a text
                        And this is another line ";

The reason why there´s a line break is that the $description is a textarea field from a post form.

Does anybody know how i can tell preg_match to regard line breaks.
ASKER CERTIFIED SOLUTION
Avatar of marchent
marchent
Flag of Bangladesh image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial