On Fri, 07 Nov 2003 21:27, [EMAIL PROTECTED] wrote;

  > +:userID        # user arrived
  > -:userID        # user left
  > s:userID:text   # user said something
  > But then, is JS any good at text parsing like this?

Sure.

  m = somestring.match(/([+\-s]):(\w+)(:(.*))?$/);
  action = m[1];
  userID = m[2];
  text = m[4];

-- 
Sam Vilain, [EMAIL PROTECTED]

Overheard at a supervision :
Supervisor : Do you think you understand the basic ideas of Quantum
             Mechanics ?
Supervisee : Ah! Well,what do we mean by "to understand" in the context
             of Quantum Mechanics?
Supervisor : You mean"No",don't you?
Supervisee : Yes.


Reply via email to