mIRC Homepage
Posted By: Slaktarn mIRC regexp - 13/06/08 09:47 AM
Hay everyone caind of new of this. Work regexp in mIRCs highlight function and if it do.... How to use it? I will have this in regexp

‹‹new›› ‹‹series››

Thanks for help /Slaktarn
Posted By: Horstl Re: mIRC regexp - 13/06/08 11:32 AM
Originally Posted By: Slaktarn
Work regexp in mIRCs highlight function

It does since v. 6.3:
Originally Posted By: versions.txt
80.Moved highlight dialog to address book and added regex support.

Originally Posted By: Slaktarn
How to use it?
Open the address book (alt-b), go to the highlight tab > add, enter a regular expression and check the regex checkbox (and maybe other highlight options you'd like to apply). smile

Example:
- highlight text (regex): /[A-Z]\d{3}/
- checked: regex, case sensitive, match on message
- matches messages: A321 or X00000 or TEST7777TEST ...
- no match on messages: b123 or A12B3 or [1234] ...

Originally Posted By: Slaktarn
I will have this in regexp ‹‹new›› ‹‹series››
What in detail do you want to match?
*<<new>> <<series>>*
or
<<*>> <<*>>
or something else? Maybe theree's no need for a regular expression at all...
Posted By: Slaktarn Re: mIRC regexp - 13/06/08 06:02 PM
if the message is this ‹‹new›› ‹‹dvdr-nordic›› The.Kite.Runner.2007.NORDiC.PAL.DVDR-SUBTiTLES by Slaktarn

How to just highlight
The.Kite.Runner.2007.NORDiC.PAL.DVDR-SUBTiTLES that or The.Kite.Runner.2007.NORDiC.PAL.DVDR-SUBTiTLES/Sample
that part of the line

And also just
dvdr-nordic

and not <<>> that ones smile

/Thx Slaktarn
Posted By: Slaktarn Re: mIRC regexp - 15/06/08 08:22 AM
Have you ppl miss this trhead ?
Posted By: RoCk Re: mIRC regexp - 16/06/08 02:06 PM

You could use $gettok for the first and you could combine $gettok with $remove for the second...

Code:

$gettok(‹‹new›› ‹‹dvdr-nordic›› The.Kite.Runner.2007.NORDiC.PAL.DVDR-SUBTiTLES by Slaktarn,3--3,32)

$remove($gettok(‹‹new›› ‹‹dvdr-nordic›› The.Kite.Runner.2007.NORDiC.PAL.DVDR-SUBTiTLES by Slaktarn,2,32),‹,›)



//echo -ae $gettok(‹‹new›› ‹‹dvdr-nordic›› The.Kite.Runner.2007.NORDiC.PAL.DVDR-SUBTiTLES by Slaktarn,3--3,32) <-- first
-
The.Kite.Runner.2007.NORDiC.PAL.DVDR-SUBTiTLES <-- first
-

//echo -ae $remove($gettok(‹‹new›› ‹‹dvdr-nordic›› The.Kite.Runner.2007.NORDiC.PAL.DVDR-SUBTiTLES by Slaktarn,2,32),‹,›) <-- second
-
dvdr-nordic <-- second
-
Posted By: Slaktarn Re: mIRC regexp - 17/06/08 09:07 AM
Its just a problem maybe i shuld told that in the first place the line are like this an exampel

Exampel, ‹‹new›› ‹‹dvdr-nordic›› Meet.The.Browns.DVDR-Counterfeit by Slaktarn

And the line is always ‹‹new›› ‹‹dvdr-nordic›› something by somename

‹‹new›› ‹‹dvdr-nordic›› something by somename

and i will highlight this parts that are red and not the rest....
Hope you get my point laugh

Thx for the help /Slaktarn
Posted By: RoCk Re: mIRC regexp - 17/06/08 12:47 PM

//echo -a $remove($gettok(‹‹new›› ‹‹dvdr-nordic›› something by somename,1--3,32),‹,›) <-- Like this?

new dvdr-nordic something <-- Like this?
Posted By: Slaktarn Re: mIRC regexp - 17/06/08 04:03 PM
Originally Posted By: RoCk

//echo -a $remove($gettok(‹‹new›› ‹‹dvdr-nordic›› something by somename,1--3,32),‹,›) <-- Like this?

new dvdr-nordic something <-- Like this?


Dunno if you got the point cuz i can´t enything about coding but will it be highlighted even if it is

Next.2007.NORDiC.PAL.DVDR-TBL or
Hay.2007.NORDiC.PAL.DVDR-EMD

like i sad the text culd be enything and changes for everytime... But it are always on same place in the lead
its just exampels..
its just ‹‹new›› ‹‹dvdr-nordic›› and "by somename" that always are the same
Posted By: RoCk Re: mIRC regexp - 17/06/08 09:16 PM

If I don't get the point it's because you keep changing it.

* RoCk walks away grumbling

Posted By: argv0 Re: mIRC regexp - 17/06/08 10:40 PM
What he gave you was *an example*, just like you gave him *an example*. You can take it from there and implement his idea with your data.

In any case, here is code that you can modify to get what you need, similar to the code you were given in #mIRC a few days back:

Code:
on ^$*:TEXT:/^‹‹(\S+)›› ‹‹(dvdr-nordic)››/S:#: {
  var %color = 10
  echo -tm # < $+ $nick $+ > $+(‹‹,$chr(3),%color,$regml(1),$chr(3),››) $&
    $+(‹‹,$chr(3),%color,$regml(2),$chr(3),››) $+($chr(3),%color,$3,$chr(3)) $4-
  haltdef
}
© mIRC Discussion Forums