*** 09/05/2002 18:46:21 ***
Closing as no point to this log
Hot Swap
*** 17/04/2002 13:08:15 ***
OK can ayone tell me where the Request for the replacement PC is.
I want to display the string "Closing as no point to this log
Hot Swap" whereas if I use your code, the string that's displayed is:
" 09/05/2002 18:46:21 "
This is my code:
<cfif Find('#Chr(13)#',qResults.Slug)>
<cfset tmp=REReplaceNoCase(qResults.Slug,'^[^a-z0-9_]*([a-z0-9_])','\1')>
<cfif Find('***',tmp) and trim(Left(tmp,Find('***',tmp)-1)) neq "">
#trim(Left(tmp,Find('***',tmp)-1))#
<cfelseif trim(Left(tmp,Find('#Chr(13)#',tmp))) neq "">
#trim(Left(tmp,Find('#Chr(13)#',tmp)))#
<cfelse>
#tmp#
</cfif>
</cfif>
> OK, just do something like
> <cfset sTmp=REReplaceNoCase(qResults.Slug,'^[^a-z0-9_]*([a-z0-9_])',
> '\1'>
> to get rid of all leading characters you do not want, and then use
> sTmp for you Find.
>
> Just a few remarks:
> '^[^a-z0-9_]*([a-z0-9_])' means
> First ^- Start at the start of the string only
> [] one of those inside, with the second ^ - one of those NOT inside
> * - repeated 0 to x times
> () take everything inside and remember it - for a back reference \1
> later
> The () has to be used to make sure that all leading whitespace is
> removed (ad consequently, you need a back reference later)
>
> You might want to experiment using a different collection of
> excluded/included chars. There is for example \s for whitespace, \S
> for non-whitespace, but my experiments with those CF-specific
> character class definitions were never too lucky, so I prefer
> enumerating the characters I want/don't want.
>
Yalta
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

