Tuesday, July 19, 2016

RegExp in JS - dont forget to put double backslashes

This works:


var s_reg=cssgroup +"-\\d";


var regexp1= new RegExp(s_reg,"i");


This doesn't work:


var s_reg=cssgroup +"-\d";

var regexp1= new RegExp(s_reg,"i");

No comments:

Post a Comment

Ubuntu 12.04, 14.04, 16.04 - auto start an app or script before login

To run a command or application at startup, even before the user has logged in, you can use this file: /etc/rc.local The commands entered...