mIRC Home    About    Download    Register    News    Help

Print Thread
#247442 02/08/14 09:46 PM
E
Exuviax
Exuviax
E
Code:
 

var %regex =  /(\.a){1,}|(\.b){1,}|(\.c){1,}|(\.d){1,}|(\.e){1,}|(\.f){1,}|(\.g){1,}|(\.h){1,}|(\.i){1,}|(\.j){1,}|(\.k){1,}|(\.m){1,}|(\.n){1,}|(\.o){1,}|(\.p){1,}|(\.q){1,}|(\.r){1,}|(\.s){1,}|(\.t){1,}|(\.u){1,}|(\.v){1,}|(\.w){1,}|(\.x){1,}|(\.y){1,}|(\.z){1,}/Sig
    if ($regex($1-,%regex)) {


Why is this timing everyone out?

#247443 02/08/14 09:57 PM
Joined: Jan 2004
Posts: 1,330
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,330
This regex is equivalent to what you have there (except that yours is missing "L"); if you wrote that yourself please read further into regular expressions. Do you even realize what it's matching?

Code:
/\.[a-z]/Si


This is a pretty loose (read: terrible) way to match links anyway, I wouldn't recommend it.

E
Exuviax
Exuviax
E
What would you recommend for a better way to catch links, I pretty much have all the letters in there from all these link shorteners? Is their a stronger way to get them, without getting people who can't use spaces?


Link Copied to Clipboard