So I've used 3 different external Regular Expression testers and they all work fine and yet PHP is screaming at me.

Here's the error:
Unknown modifier ':'

Code:

$test = array();
preg_match("^(\\w*) [^:]*:([^:]*):", $buffer, $test);

$buffer is:

2 1101508078.M875294P6451V0000000000000301I0070014A_0.*******.com,S=2350:ACNDddads4:

    Try adding slashes(didnt check your syntax but that just caught my eye):

    preg_match("/^(\w*) [^:]*:([^:]*):/", $buffer, $test);

      Yeah, I was reading the documentation for the 129038th time and my brain went "Woah, they all have slashes."

      Worked.

      Thanks. 🙂

        Write a Reply...