#23219 [NEW]: Cannot use symbols as delimiters
| From: | lucphp at BrazilianTranslation dot net | Date: | Tue, 15 Apr 2003 04:49:43 +0000 |
| Subject: | #23219 [NEW]: Cannot use symbols as delimiters | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-37688@lists.php.net to get a copy of this message | ||
From: lucphp at BrazilianTranslation dot net
Operating system: Windows 98 SE
PHP version: 4.3.1
PHP Bug Type: *Regular Expressions
Bug description: Cannot use symbols as delimiters
I have some scripts that use a lot of preg_match and preg_replace. And I
use the ¢ symbol as a delimiter because
I never used that symbol for anything else in my life, so I never have to
worry about escaping it. I would be escaping (and missing) a lot of
occurrences if I had been using / or | . I have used these scripts for
many months, almost a year. I didn't use them in about a month, maybe a
little
more, and I don't remember updating/upgrading PHP during that period. But
my mind could be deceiving me. Maybe the last time I used them was before
I updated PHP to v. 4.3.1. At least I am 100% sure the scripts and my INI
file have not been changed. They should be working.
Now I try to run my old scripts and, in some of them, PHP gives me some
attitude:
Warning: Delimiter must not be alphanumeric or backslash in
C:\WINDOWS\Desktop\conversor-folha.php on line 25
Some scripts work, others don't. What can I do to pinpoint the problem?
------------------------ 8< ------------------------
$pattern = '¢(Foi encontrado|Foram encontrados) *<b>[0-9]+</b>
*anúncios?.*Clique nos ícones para adicionar os anúncios
à "¢s';
$po = preg_match ($pattern, $x, $matches);
------------------------ >8 ------------------------
Thanks,
Luciano ES
Santos, SP - Brasil
--
Edit bug report at http://bugs.php.net/?id=23219&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23219&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23219&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23219&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23219&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23219&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23219&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23219&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23219&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23219&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23219&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23219&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23219&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23219&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23219&r=gnused