Bug #66708 [Opn->Nab]: preg_match reports missing right-perand incorrectly

From: Date: Thu, 13 Feb 2014 17:27:48 +0000
Subject: Bug #66708 [Opn->Nab]: preg_match reports missing right-perand incorrectly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184289@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66708&edit=1 ID: 66708 Updated by: requinix@php.net Reported by: jbeecher at oneendlessloop dot com Summary: preg_match reports missing right-perand incorrectly -Status: Open +Status: Not a bug Type: Bug Package: Regexps related Operating System: Linux PHP Version: Irrelevant Block user comment: N Private report: N New Comment: \c is supposed to be \cX, where X is a character. Together they form the escape sequence for a control character. You've given it \c). You'd need another ) after that - except I don't think you mean to use \c) in the first place. Previous Comments: ------------------------------------------------------------------------ [2014-02-13 16:29:16] jbeecher at oneendlessloop dot com Description: ------------ Valid regexp: /[a-z0-9]{1,25}\s+([0-9]{3,12})\s+[.]*(\-\c)/i Test script: --------------- Example data (to grep against): blinky 5321 1 0 Feb07 ? 00:03:41 php ./di-sup.php -c 1 -i /ftpacct/max/pub/MAX -p /ftpacct/max/pub/MAX -n mixlplick -l /home/blinky/M006615/custlogs/MAX -e reports@maxic-reports.com -x rubber1333! Expected result: ---------------- preg_match() should return an array of matched values. Actual result: -------------- preg_match() returned false (not zero, but boolean false) i.e. there was an error. The error message was, "preg_match(): Compilation failed: missing ) at offset 43" Which is incorrect. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=66708&edit=1

« previous php.bugs (#184289) next »