Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-22-2010, 08:35 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by Loriel View Post
Regular expressions are goddamn retarded, here is the perl regexp for matching an email address

...

i am not really sure this is what we need to deliver a better gameplay experience in graal
That is such an extreme example and you know it :P In fact, I've never seen a regex expression that long before.
Reply With Quote
  #2  
Old 01-22-2010, 09:31 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Quote:
Originally Posted by DustyPorViva View Post
That is such an extreme example and you know it :P In fact, I've never seen a regex expression that long before.
Neither have I.

Also, what? I've seen much shorter regular expressions to match an email address, you must be mistaken.

Edit:
I just looked it up, you are way off. The regular expression to find an email address (may vary slightly between implementations) is:
NPC Code:

\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b



In this instance using grep
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #3  
Old 01-22-2010, 09:40 PM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Quote:
Originally Posted by coreys View Post
Neither have I.

Also, what? I've seen much shorter regular expressions to match an email address, you must be mistaken.

Edit:
I just looked it up, you are way off. The regular expression to find an email address (may vary slightly between implementations) is:
NPC Code:

\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b



In this instance using grep
That technically doesn't match the RFC 2822 specifications for an e-mail address.


Anyways, like I said, 90% of people who use regex don't actually understand what the hell it does or how it works, even if they understand the syntax.

This results in a lot of copying-and-pasting into your codebase from other places, and therefore a lot of potential edge-cases where your script could grind to a halt.
Reply With Quote
  #4  
Old 01-22-2010, 10:09 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Quote:
Originally Posted by coreys View Post
Neither have I.

Also, what? I've seen much shorter regular expressions to match an email address, you must be mistaken.

Edit:
I just looked it up, you are way off. The regular expression to find an email address (may vary slightly between implementations) is:
NPC Code:

\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b



In this instance using grep
that does not even match the .museum tld
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:21 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.