Re: RegEx (back referencing)
| From: | Richard Lynch | Date: | Mon, 05 Aug 2002 06:43:21 +0000 |
| Subject: | Re: RegEx (back referencing) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-111166@lists.php.net to get a copy of this message | ||
>Hi,
>
>I am am writing a function to color code and indent JavaScript source using
>regular expressions and cannot seem to get back referencing working. The
>pattern match is successful but the output is a single unrecognised
>character (a square).
>
>$string = eregi_replace("<(/?)(scr[^>]*)>", "«font
>color=maroon»\1«/font»",
>$string);
>
>This results in opening and closing <script></script> tags being replaced
>with a square being wrapped in font tags. I have this working in Cold Fusion
>but cannot seem to convert my scripts to PHP. Can anyone help?
If the « you posted is actually in your source code instead of << it ain't
gonna work...
^
/ \
This is not a valid ASCII character.
--
Like Music? http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro). Need to record live events (mixed already) to stereo
CD-quality. Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff. Zero (0)
post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.