View Single Post
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-18-2012 , 10:22   Re: [TUT] Regular Expressions
Reply With Quote #13

Try this include.

Spoiler


Code:
#include <amxmodx> #include <regex_split> public plugin_init() {         new ret, error[128];     new Regex:pattern = regex_compile_split(" ", ret, error, charsmax(error));         new output[10][2];     new count = regex_split_c("1 2 3 4 5 6 7 8 9", pattern, ret, output, sizeof(output), charsmax(output[]));         for(new i = 0; i < count; i++) {                 log_amx("Found: %s", output[i]);             }         count = regex_split("a:b:c d:e", " ", ret, output, sizeof(output), charsmax(output[]), error, charsmax(error));         for(new i = 0; i < count; i++) {                 log_amx("Found: %s", output[i]);             } }
Attached Files
File Type: inc regex_split.inc (4.3 KB, 261 views)
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 06-18-2012 at 10:23.
Exolent[jNr] is offline