Ah, sorry to be confusing.  The notation

  /\W/g

is a regular expression literal.

Regular expressions are a very powerful feature of JavaScript (and other
languages).  They are a bit obtuse, but a single function call using a
regular expression can often replace many lines of code, and process
more quickly.

If you want, you can read all about regular expressions in detail at:
<http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:Regular_
Expressions>

Specifically, the expression above says, "match any non-word character
multiple times."  The forward slashes delimit the regular expression
literal, in the same way that quotes delimit string literals.  The '\W'
character is a special notation for "non-word character."  (The
backslash denotes an escape code, like '\t' for a tab.)  The 'g' at the
end is a modifier flag that tells the regular expression to perform
multiple (or "global") matches instead of just matching the first
occurrence.

Dan


--
Users of FusionPro Desktop have unlimited free email support. Contact Printable 
Support at [EMAIL PROTECTED]
--
View FusionPro Knowledge Base, FusionPro Samples at
www.printable.com/vdp/desktop.htm

--
You are currently subscribed to fusionpro as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
--


--
Note:  All e-mail sent to or from this address will be received or otherwise 
recorded by the e-mail recipients of this forum. It is subject to archival, 
monitoring or review by, and/or disclosure to someone other than the recipient. 
Our privacy policy is posted on www.printplanet.com
--

Reply via email to