/**
* 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 1208 0.3 0.4 1309952 75604 ? Ssl 2025 1540:35 node /home/sasa/dex8/dex8-panel/server/index.js sasa 1236 0.5 0.6 11821252 100084 ? Ssl 2025 2432:45 node /home/sasa/mikosoft_hr/www-mikosoft-hr/server/index.js sasa 1257 0.3 0.4 1308260 74268 ? Ssl 2025 1559:35 node /home/sasa/mikosoft-info/www-mikosoft-info/server/index.js sasa 1289 0.3 0.4 1301776 69880 ? Ssl 2025 1536:11 node /home/sasa/dex8/dex8-kiosk/server/index.js sasa 1363 4.2 3.3 12257236 554500 ? Ssl 2025 19705:39 node /home/sasa/voovuu/voovuu-pub/server/index.js sasa 1886 7.4 3.7 12280452 616924 ? Ssl 2025 34405:49 node /home/sasa/mikosoft-info/crypto-mikosoft-info/server/index. www-data 528577 0.0 0.0 2608 592 ? S 05:58 0:00 sh -c ps -aux | grep node www-data 528579 0.0 0.0 3304 712 ? S 05:58 0:00 grep node sasa 1214480 0.3 0.7 22311168 123416 ? Ssl 2025 1337:19 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214483 0.3 0.3 1102080 64680 ? Ssl 2025 1226:51 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214536 0.3 0.3 1100804 64604 ? Ssl 2025 1225:14 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214544 0.3 0.3 1102312 64884 ? Ssl 2025 1235:16 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214588 0.3 0.4 1103364 65668 ? Ssl 2025 1228:53 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214617 0.3 0.4 1102208 65852 ? Ssl 2025 1224:36 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214641 0.3 0.3 1166184 64212 ? Ssl 2025 1216:05 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214671 0.3 0.4 1102688 65832 ? Ssl 2025 1210:12 node /home/sasa/dex8/dex8-worker/starter.js sasa 1215731 0.8 0.7 11847236 124936 ? Ssl 2025 3217:06 node /home/sasa/dex8/dex8-api/starter.js sasa 1216489 0.3 0.3 1101816 64552 ? Ssl 2025 1225:07 node /home/sasa/dex8/dex8-worker/starter.js sasa 1399960 0.8 0.6 11826268 113684 ? Ssl Apr20 1801:50 node /home/sasa/dex8/dex8-www/server/index.js sasa 1631573 0.4 0.4 1303396 81184 ? Ssl May31 725:10 node /home/sasa/.pm2/modules/pm2-logrotate/node_modules/pm2-logr sasa 1824679 0.4 0.5 11799040 84084 ? Ssl Aug15 167:37 node /home/sasa/kriptus/kriptus-panel/server/index.js sasa 2448036 1.2 1.1 11898160 187276 ? Ssl Aug21 356:24 node /home/sasa/miko/miko-hr/server/index.js sasa 2628167 0.7 0.7 1177564 130968 ? Ssl 2025 3525:41 node /home/sasa/voovuu/voovuu-api/starter.js sasa 2663246 2.5 0.7 11840512 124144 ? Ssl Aug23 650:57 node /home/sasa/kriptus/kriptus-api/starter.js sasa 3168557 0.6 0.5 11805788 95132 ? Ssl 2025 2723:18 node /home/sasa/mikosoft-info/dodo-mikosoft-info/server/index.js sasa 3169051 0.5 0.5 11799488 83140 ? Ssl 2025 2241:13 node /home/sasa/@mikosoft/dodo-examples/server/index.js sasa 3264954 0.6 0.5 1332864 85792 ? Ssl Feb21 2005:41 node /home/sasa/mikosoft-info/api-mikosoft-info/starter.js sasa 3358795 0.6 0.5 1266648 89268 ? Ssl Aug29 103:44 node /home/sasa/miko/miko-hr/api/starter.js sasa 3809381 0.3 0.5 11802148 91896 ? Ssl Sep02 38:54 node /home/sasa/dex8/dex8-worker/starter.js