mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2015
Posts: 133
K
Vogon poet
OP Offline
Vogon poet
K
Joined: May 2015
Posts: 133
Checked the regex in an online checker, it works there as it should. Not working though, what am i missing? It should echo, if you type 8 words back to back, but for some reason it isn't.

Code:
on *:text:*:#: {
  if ($regex($1-,/(\S+\s*)\1{7,}/i))  {
  echo -a Matched Successfully
  }
}


Thanks!

Last edited by keyeslol; 14/11/15 10:56 PM.

twitter @keyeslol
Joined: Jan 2004
Posts: 1,361
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,361
You're capturing the spaces, this forces the same number of spaces to occur after each word - including the last. I think mIRC also chokes on the comma, separate the regex:

Code:
var %regex = /(\S+)(\s*\1){7,}/i
echo -ag $regex($1-,%regex)

Last edited by Loki12583; 14/11/15 11:21 PM.
Joined: May 2015
Posts: 133
K
Vogon poet
OP Offline
Vogon poet
K
Joined: May 2015
Posts: 133
Still crapping out somewhere:

Code:
  var %regex = /(\S+)(\s*\1){7,}/i
  if ($regex($1-,%regex)) {
    do
}

Last edited by keyeslol; 14/11/15 11:29 PM.

twitter @keyeslol
Joined: Jan 2004
Posts: 1,361
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,361
What text are you testing against?

//tokenize 32 ab ab ab ab ab ab ab ab | var %regex = /(\S+)(\s*\1){7,}/i | echo -ag $regex($1-,%regex)

Joined: May 2015
Posts: 133
K
Vogon poet
OP Offline
Vogon poet
K
Joined: May 2015
Posts: 133
Thanks, i got it working dude!

Last edited by keyeslol; 15/11/15 12:42 AM.

twitter @keyeslol

Link Copied to Clipboard