On Sat, Aug 03, 2002 at 05:03:36PM +0100, Phil Ewington wrote:
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.
What you're using isn't back referencing, it's utilizing substrings.
Back
try
\\1
- Original Message -
From: Phil Ewington [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Saturday, August 03, 2002 5:03 PM
Subject: [PHP] RegEx (back referencing)
Hi,
I am am writing a function to color code and indent JavaScript source
using
regular expressions
- not perfect, but a start.
Danny.
- Original Message -
From: Phil Ewington [EMAIL PROTECTED]
To: Danny Shepherd [EMAIL PROTECTED]
Sent: Saturday, August 03, 2002 5:52 PM
Subject: RE: [PHP] RegEx (back referencing)
\\1 outputs nothing at all wrapped in font tags and closing tags \ wrapped
What's strange is that doing an ord($string) returns 171, which is a '1/2'
char. So why does PHP convert the pattern match??
-Original Message-
From: Phil Ewington [mailto:[EMAIL PROTECTED]]
Sent: 03 August 2002 17:04
To: PHP General
Subject: [PHP] RegEx (back referencing)
Hi,
Danny,
It still doesn't work, could this be a problem in 4.0.4pl1 ??
-Original Message-
From: Danny Shepherd [mailto:[EMAIL PROTECTED]]
Sent: 03 August 2002 18:11
To: [EMAIL PROTECTED]; PHP-General
Subject: Re: [PHP] RegEx (back referencing)
If you're trying to get scriptLots
PM
Subject: RE: [PHP] RegEx (back referencing)
Danny,
It still doesn't work, could this be a problem in 4.0.4pl1 ??
-Original Message-
From: Danny Shepherd [mailto:[EMAIL PROTECTED]]
Sent: 03 August 2002 18:11
To: [EMAIL PROTECTED]; PHP-General
Subject: Re: [PHP] RegEx
PROTECTED]
Sent: Saturday, August 03, 2002 8:54 PM
Subject: RE: [PHP] RegEx (back referencing)
Danny,
OK, the input string is the contents of a file, the idea is to output
color
coded and indented code in HTML. So searching for script and replace
with
font color=maroonscript/font, so
7 matches
Mail list logo