/** * String methods: replace * The replace() method returns a new string with some or all matches of a * pattern replaced by a replacement. */ var str, x, xg, xi; str = "simple example of simple string BIG big"; x = str.replace('simple', 'not simple'); //replace first match xg = str.replace(/s\w+e/g, 'not simple'); //replace all matches xi = str.replace(/BiG/i, 'SmaLL'); //case insensitive replacement console.log(x); // not simple example of simple string BIG big console.log(xg); // not simple example of not simple string BIG big console.log(xi); // simple example of simple string SmaLL big
not simple example of simple string BIG big not simple example of not simple string BIG big simple example of simple string SmaLL big
$ps -aux | grep node (list all node processes) sasa 831 0.5 0.4 1303960 80560 ? Ssl Jun15 121:23 node /home/sasa/.pm2/modules/pm2-logrotate/node_modules/pm2-logr sasa 843 0.5 0.6 11699640 104376 ? Ssl Jun15 116:51 node /home/sasa/dex8/dex8-api/starter.js sasa 858 0.4 0.4 1303596 72632 ? Ssl Jun15 91:40 node /home/sasa/regoch/regoch-www/server sasa 867 0.3 0.4 1298972 66580 ? Ssl Jun15 86:32 node /home/sasa/dex8/dex8-panel/server/index.js sasa 886 0.8 0.6 11825252 111444 ? Ssl Jun15 182:48 node /home/sasa/dex8/dex8-www/server/index.js sasa 888 0.5 0.4 11794160 79540 ? Ssl Jun15 126:43 node /home/sasa/mikosoft_hr/www-mikosoft-hr/server/index.js sasa 904 0.7 0.5 1329652 82136 ? Ssl Jun15 168:13 node /home/sasa/mikosoft-info/api-mikosoft-info/starter.js sasa 910 0.3 0.4 1300780 69324 ? Ssl Jun15 87:17 node /home/sasa/mikosoft-info/www-mikosoft-info/server/index.js sasa 969 0.3 0.3 1297484 64744 ? Ssl Jun15 86:18 node /home/sasa/dex8/dex8-kiosk/server/index.js sasa 970 0.6 0.7 11840672 119516 ? Ssl Jun15 155:08 node /home/sasa/mikosoft-info/dodo-mikosoft-info/server/index.js sasa 1010 0.6 0.6 1147316 103284 ? Ssl Jun15 145:40 node /home/sasa/voovuu/voovuu-api/starter.js sasa 1016 0.8 1.1 11877580 186360 ? Ssl Jun15 192:53 node /home/sasa/voovuu/voovuu-pub/server/index.js sasa 1086 0.4 0.4 11794400 77864 ? Ssl Jun15 93:28 node /home/sasa/@mikosoft/dodo-examples/server/index.js sasa 1089 0.3 0.3 1099356 65216 ? Ssl Jun15 88:26 node /home/sasa/dex8/dex8-worker/starter.js sasa 1159 0.3 0.4 22276156 76620 ? Ssl Jun15 89:52 node /home/sasa/dex8/dex8-worker/starter.js sasa 1160 0.3 0.3 1099356 63604 ? Ssl Jun15 88:32 node /home/sasa/dex8/dex8-worker/starter.js sasa 1241 0.3 0.3 1100952 63908 ? Ssl Jun15 88:49 node /home/sasa/dex8/dex8-worker/starter.js sasa 1242 0.4 0.5 22284380 84408 ? Ssl Jun15 94:04 node /home/sasa/dex8/dex8-worker/starter.js sasa 1323 0.3 0.3 1099100 63756 ? Ssl Jun15 88:40 node /home/sasa/dex8/dex8-worker/starter.js sasa 1324 0.3 0.3 1099616 64600 ? Ssl Jun15 88:27 node /home/sasa/dex8/dex8-worker/starter.js sasa 1398 0.3 0.3 1099104 64036 ? Ssl Jun15 88:37 node /home/sasa/dex8/dex8-worker/starter.js sasa 1400 0.3 0.3 1099356 63872 ? Ssl Jun15 88:52 node /home/sasa/dex8/dex8-worker/starter.js sasa 1465 0.3 0.3 1099360 64496 ? Ssl Jun15 88:39 node /home/sasa/dex8/dex8-worker/starter.js sasa 178968 0.8 0.6 11810912 98744 ? Ssl Jun17 161:21 node /home/sasa/mikosoft-info/crypto-mikosoft-info/server/index. sasa 337381 1.2 0.5 1317564 91440 ? Ssl Jun19 202:53 node /home/sasa/crypto/dex-arbitrage-bot/scripts/observer/index2 www-data 1162455 0.0 0.0 2608 608 ? S 23:41 0:00 sh -c ps -aux | grep node www-data 1162457 0.0 0.0 3304 664 ? S 23:41 0:00 grep node