Raised This Month: $ Target: $400
 0% 

Try Regex


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FaTony
Veteran Member
Join Date: Aug 2008
Old 10-20-2012 , 23:16   Re: Try Regex
Reply With Quote #1

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
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 18:29.


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