if { [regexp {(?i)Map name[^\n]*\n[^\n]*: ([^\n]*)<.*Game mode[^\n]*\n[^\n]*: ([^\n]*)<.*Number of players[^\n]*\n[^\n]*: ([^\n]*)<.*Maximum number of players[^\n]*\n[^\n]*: ([^\n]*)<.*Server IP[^\n]*\n[^\n]*: ([^\n]*)<} $body {} mapname gamemode numplayers maxplayers sevrerip] } {
success
} else {
failure
}
within "success" you can access the 5 variables with its normal content and formate it to an output.
If "failure" the site is most likely broken or has changed its style.
you can refer the TCL manual to understand more about regexp and re_syntax.
PS: [^\n] stands for all characters except line break. Plus I hope I didnt break the expression, when editing it .
hm.. am i the only one noticing? i clicked on "new entries since last visit" and i saw about 4 posts called "script request!" in the requests forum...
guys, of course it is a request if you're posting in the _requests_ forum
wasn't there a rule about "meaningful topic names"?