Link to home
Create AccountLog in
Avatar of Coast Line
Coast LineFlag for Canada

asked on

Need a Bit more change in the extraction of name from email address

<CFSet variables.extracted =REMatch("""[^""]+""" , """The randhawa"" <myselfrandhawa@yahoo.com>")>
<CFDump var= "#variables.extracted#" label ="Email Address">


Currently it is showing as:

"The randhawa"

i want it to be as:

The randhawa

removing the quotes, please guide
ASKER CERTIFIED SOLUTION
Avatar of Terry Woods
Terry Woods
Flag of New Zealand image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thanks, kaufmed, for the correction! I worship your regexly knowledge! ;-)
I'm always disappointed whenever I find a new language/editor that doesn't fully support lookaround  :)
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
>> I'm always disappointed whenever I find a new language/editor that doesn't
>> fully support lookaround  :)

Yeah,  that's one failing in the basic regex functionality. But you could easily use the underlying java, which IIRC does support it ;-)
@_agx_

I haven't gotten quite that far in my CF experiments yet, but true nonetheless  : )
Since it all compiles to java anyways, why is there such a difference between the CF regex and the Java?
Backward compatibility maybe? (CF wasn't always java based).  But that's a total guess ;-)
>>  ... CF wasn't always java based...

Ahh. Did not know that.
Yeah, it's been java based for a while now. But back in dinosaur days it was written in C++ ;-)