int this->REeq(string[subject],string[pattern],int [option]);

(Caronte Pcode version 2.0)

Description

int this->REeq( string[subject],string[pattern],int [option]);

Searches subject for a match to the regular expression given in pattern.
Return 1 is true or 0 for false

If matches is provided, then it is filled with the results of special function :
this->$1();
this->$2();
this->$3();
this->$4();
this->$5();

Option
CASELESS = 1
MULTILINE = 2
DOTALL = 4
EXTENDED = 8


Searches subject for a match to the regular expression given in pattern.

Example.

Source:

CS_ANTISPAM_SCRIPT this = new CS_ANTISPAM_SCRIPT($_this);

#define CASELESS 1

string dati = "http://www.caronteantispam.it/index.html";

if (this->REeq( dati,"^(http:\\/\\/)?([^\\/]+)",CASELESS) == 1)
{
string host = this->$2(); //special function for match
this->Print(host);
}




Out:


www.caronteantispam.it