Oops---

<cfset email = ReReplaceNocase(email, ".*<([^>]*)>.*", "\1")/>

is better

On May 12, 2004, at 10:10 AM, Dick Applebaum wrote:

> <cfset email = ReReplaceNocase(email, ".*<([^>]*)>.?", "\1")/>
>
>  HTH
>
>  Dick
>
>  On May 12, 2004, at 9:58 AM, Charlie Griefer wrote:
>
>  > On another forum, a user asked how to turn this string:
>  >
>  >  FirstName LastName <[EMAIL PROTECTED]>
>  >
>  >  into this string:
>  >
>  >[EMAIL PROTECTED]
>  >
>  >  I was able to come up with:
>  >
>  >  <cfset email = reReplace(left(email, len(email)-1), '(^.*<)', '',
>  > 'all')>
>  >
>  >  I feel a little cheesy using the left() function to remove that
> last
>  >  bracket, as I'm sure there must have been a way within the same
> regex.
>  >
>  >  I tried a variety of things, such as adding .$ and even the
> literal >
>  > to the
>  >  _expression_ above, but I assume that means it was looking for that
>  > _expression_
>  >  as an _expression_ itself.  But there has to be a way to say, replace
>  > (this
>  >  exp) AND (that exp)?  or would it just be a case of nesting
>  > reReplace()
>  >  functions?
>  >
>  >  Charlie
>  >  -still trying to get a handle on regex
>  >
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to