how to regex this one?

These are old archives. They are kept for historic purposes only.
Post Reply
johnny

how to regex this one?

Post by johnny »

*w*w*w*.**e*r*o*t*i*k*.*t*v.*t*r
Syzop
UnrealIRCd head coder
Posts: 2112
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Post by Syzop »

"*w*w*w*.**e*r*o*t*i*k*.*t*v.*t*r" is the actual text?
Well, then escape all * to \* and all . to \.
so: \*w\*w\*w\*\.\*\*e\*etc.....

makes me wonder if people actually go visit that link if they have to type it manually ;).

(on a sidenote, in next unreal there will be an additional shorter/easier method)
johnny

Post by johnny »

Must be, since we are getting them =)
Thanks for the regex
Jason
Posts: 570
Joined: Mon Jun 14, 2004 5:09 pm

Post by Jason »

Syzop wrote:(on a sidenote, in next unreal there will be an additional shorter/easier method)
Oh?

Like what?

You have me curious
Why the hell can't my signature be empty?
"Your message contains too few characters."
codemastr
Former UnrealIRCd head coder
Posts: 811
Joined: Sat Mar 06, 2004 8:47 pm
Location: United States
Contact:

Post by codemastr »

The new version of the regexp library we use supports a "quoting" mechanism (it works like vi). So you would be able to do:

\Q*w*w*w*.**e*r*o*t*i*k*.*t*v.*t*r\E

And it would treat everything between the \Q and \E as plaintext.
-- codemastr
Post Reply