String.Match() without RegEX
<p>In the following snippet, I'm unsure how the RegEx is assigned to match(), is a RegEx always needed?:</p>

<p>----------Match------------</p>

<pre><code>case 'remove':
var rep=o.className.match(' '+c1)?' '+c1:c1;
o.className=o.className.replace(rep,'');
break;
</code></pre>

<p>------Full--Code--------------</p>

<pre><code>function cssjs(a,o,c1,c2){
switch (a){
case 'swap':
if(!domtab.cssjs('check',o,c1)){
o.className.replace(c2,c1)
}else{
o.className.replace(c1,c2);
}
break;
case 'add':
if(!domtab.cssjs('check',o,c1)){
o.className+=o.className?' '+c1:c1;
}
break;
case 'remove':
var rep=o.className.match(' '+c1)?' '+c1:c1;
o.className=o.className.replace(rep,'');
break;
case 'check':
var found=false;
var temparray=o.className.split(' ');
for(var i=0;i&lt;temparray.length;i++){
if(temparray[i]==c1){found=true;}
}
</code></pre>
