• Welcome to Valhalla Legends Archive.

Javascript Question

Started by QwertyMonster, January 26, 2009, 11:46 AM

Previous topic - Next topic


Okay so i'm trying to work out what this javascript regex function does, and I really can't work it out. Can someone help me? I know it splits usernames into "username|username" and so on. I also know (I think) /g means it will encrypt all usernames, or in this case replace them with something.

I have no idea what the /\% does though. Can someone help me with this?


        var i, usrsArr = usrs.split("|");
        for(i = 0; i < usrsArr.length;i++)

EDIT: And yes, it's been a long time since I posted.  :)


This is regexp, dude.

"//" are borders, and "\%" is escaped "%"

google://regular expression

btw, usrs.split("|");
| imo must be escaped

+rep me :)