Raised This Month: $51 Target: $400
 12% 

Try Regex


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 10-20-2012 , 18:45   Try Regex
Reply With Quote #1

First for all, I'm not good with these
Secondly I looked some threads from scripting section about regex, but I didn't quite understand.
Third, sry for bad english
Fourth, lousy tutorial




My snippet

How this work





Zipped test plugin
Attached Files
File Type: zip regex_fun.zip (3.0 KB, 94 views)

Last edited by Bacardi; 10-21-2012 at 04:23. Reason: forget upload zip
Bacardi is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 10-20-2012 , 23:16   Re: Try Regex
Reply With Quote #2

I'll share some of mine:
Valid integer (useful for StringToInt implementation):
Code:
"[+-]?\\b\\d+\\b"
Valid float (useful for StringToFloat implementation):
Code:
"[+-]?(\\b\\d+(\\.\\d+)?|(\\b\\d+)?\\.\\d+)([eE][+-]?\\d+)?\\b"
Tokenizing semicolon delimited string:
Code:
"([^;\"]+|\"[^\"]*\")+"
Tokenizing arguments of console command call:
Code:
"[\\S\"]+|\"[^\"]*\""
C++ style comment:
Code:
"//.*$"
__________________

Last edited by FaTony; 10-20-2012 at 23:24.
FaTony is offline
hamilton5
Veteran Member
Join Date: Oct 2012
Location: USA
Old 10-21-2012 , 03:05   Re: Try Regex
Reply With Quote #3

how about http://www.regular-expressions.info/ for useful link.. ?
hamilton5 is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 10-21-2012 , 04:22   Re: Try Regex
Reply With Quote #4

Quote:
Originally Posted by FaTony View Post
I'll share some of mine:
Thanks.
Quote:
Originally Posted by hamilton5 View Post
how about http://www.regular-expressions.info/ for useful link.. ?
Ok, thanks.
Bacardi is offline
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 -4. The time now is 02:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode