Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var rx = new RegExp("^\\[\\d+-\\d+-\\d+\\s(\\d+:\\d+):\\d+\\s\\w+\\]\\s(\\w+):.*");
- var res = msg.match(rx);
- if(res)
- {
- console.log(res[1]); //time
- console.log(res[2]); //name
- }
- delete res;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement