- Joined
- Feb 22, 2006
- Messages
- 960
So I'm working on a StringPattern-System and I need some suggestions what you would like to see in this system. Actually i have following features:
then there is the question if there is rly the need for such a system
JASS:
//For Players i have:
%p00-%p11
//For any playername
%p
//For Any character
(.)
//For only digits
%d
//For only words (including digits but no punctuation)
%w
//For only punctuation
%s
Then opperators:
+
&&
||
* <= address operator
For charactarblock seperation
(
)
//If you create a StringPattern it'll look like this
StringPattern pattern = StringPattern.create("send %p (%d*5)")
//You could check if a playermessage matches this:
playerMsg = "send xD.Schurke 10000"
if pattern.matches(playerMsg) then
...
endif
//this would match the pattern 'cause xD.Schurke is one of the players and the "number" is 5-digit
then there is the question if there is rly the need for such a system