we ultimately came up with this:
(?![/]#Variables.Word#)(\W)(#Variables.Word#)(\W)
The only downside that we found is if the word is at the very end or
beginning of the paragraph.
That's the \W bits you're using - they're wrong; you want a zero-width word
boundary, not a non-word character.
Thanks, I will try that out locally and make a note to apply it the next
time I am in there since I already initiated the push process to get the
changes into place.
On Fri, Nov 7, 2008 at 8:03 AM, Peter Boughton [EMAIL PROTECTED] wrote:
we ultimately came up with this:
That's the \W bits you're using - they're wrong; you want a
zero-width word boundary, not a non-word character.
Use \b(#Variables.Word#)\b and you wont need to do the workaround.
Thanks Peter... I'd never used word boundaries... so of course, they
don't occur to me when I go to write a
The \b actually did not work, it put the link within the first span element
but maybe was how I tested it. I tried: (?![/]sub)(\b)(sub)(\b) as
well as (?![/]sub)\b(sub)\b
On Fri, Nov 7, 2008 at 10:49 AM, s. isaac dealey [EMAIL PROTECTED] wrote:
That's the \W bits you're using - they're
The \b actually did not work, it put the link within the first span element
but maybe was how I tested it. I tried: (?![/]sub)(\b)(sub)(\b) as
well as (?![/]sub)\b(sub)\b
Ah, you need to change your \2 to \1 in your replace part.
Since the \b is zero-width, it looks like it wont populate a
I have been using REReplace to find key words or group of words within
paragraphs and if found to replace those with an HREF. All has been working
fine and well until recently when one of those key words became sub and
some paragraphs make use of the HTML element SUB. So what I am curious on
is
I have been using REReplace to find key words or group of words within
paragraphs and if found to replace those with an HREF.
The following code works.
(I haven't yet decided whether it's entirely the best way though...)
cfset Content = ListToArray(Content,'')/
cfloop index=i from=1
Thanks Peter, I got to talking to Isaac Dealey this evening about this since
he had helped out a while back on this particular project. He mentioned
what I need is a lookahead in the regex. After a few tries this is what we
ultimately came up with this:
8 matches
Mail list logo