Since escaping a normal character just produces that character, this seems like 
a pretty safe change.  What needs to be escaped are those characters that have 
special meaning in javascript regular expressions, so there's no need to worry 
about variances between languages.

-Dave


On Jun 16, 2013, at 11:15 PM, Zhou Renjian 
<zhourenj...@gmail.com<mailto:zhourenj...@gmail.com>> wrote:


>From page:

http://www.fon.hum.uva.nl/praat/manual/Regular_expressions_1__Special_characters.html

It seems that we need to add more characters, like "<>-&". But other pages 
saying that these characters may vary from language to language.

I am somewhat busy these days for another deadline. David & Bob, could you 
spend a little time to test out whether characters <>-& should be escaped or 
not.

c1 = c1.replace (/([\\\/\$\.\*\+\{\}\?\^\(\)\[\]\|\<\>\-\&])/g, function ($0, 
$1) {

return "\\" + $1;

});

Regards,
Zhou Renjian


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to