/**
* 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 1308320 74064 ? Ssl 2025 1604:31 node /home/sasa/dex8/dex8-panel/server/index.js sasa 1236 0.5 0.6 11822388 100828 ? Ssl 2025 2533:04 node /home/sasa/mikosoft_hr/www-mikosoft-hr/server/index.js sasa 1257 0.3 0.4 1308004 72320 ? Ssl 2025 1623:39 node /home/sasa/mikosoft-info/www-mikosoft-info/server/index.js sasa 1289 0.3 0.4 1302880 70348 ? Ssl 2025 1599:23 node /home/sasa/dex8/dex8-kiosk/server/index.js sasa 1363 4.2 3.7 12307812 607580 ? Ssl 2025 20494:29 node /home/sasa/voovuu/voovuu-pub/server/index.js sasa 1886 7.7 4.2 12354436 696268 ? Ssl 2025 37261:49 node /home/sasa/mikosoft-info/crypto-mikosoft-info/server/index. sasa 1214480 0.3 0.7 22311168 123852 ? Ssl 2025 1407:36 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214483 0.3 0.3 1101568 65108 ? Ssl 2025 1294:09 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214536 0.3 0.3 1101060 64612 ? Ssl 2025 1292:25 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214544 0.3 0.4 1102312 65600 ? Ssl 2025 1303:05 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214588 0.3 0.3 1102340 64352 ? Ssl 2025 1296:32 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214617 0.3 0.3 1102208 65492 ? Ssl 2025 1291:53 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214641 0.3 0.3 1166440 63588 ? Rsl 2025 1283:22 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214671 0.3 0.3 1100128 62912 ? Ssl 2025 1277:11 node /home/sasa/dex8/dex8-worker/starter.js sasa 1215731 0.9 0.7 11847236 122712 ? Ssl 2025 3630:40 node /home/sasa/dex8/dex8-api/starter.js sasa 1216489 0.3 0.3 1101304 64280 ? Ssl 2025 1292:31 node /home/sasa/dex8/dex8-worker/starter.js sasa 1399960 0.8 0.6 11806812 108580 ? Ssl Apr20 1962:32 node /home/sasa/dex8/dex8-www/server/index.js sasa 1631573 0.5 0.4 1303364 81524 ? Ssl May31 852:09 node /home/sasa/.pm2/modules/pm2-logrotate/node_modules/pm2-logr sasa 1824679 0.4 0.5 11798848 83944 ? Ssl Aug15 263:09 node /home/sasa/kriptus/kriptus-panel/server/index.js www-data 2021756 0.0 0.0 2608 596 ? S 07:29 0:00 sh -c ps -aux | grep node www-data 2021758 0.0 0.0 3304 648 ? S 07:29 0:00 grep node sasa 2448036 1.3 0.9 11857560 159896 ? Ssl Aug21 642:54 node /home/sasa/miko/miko-hr/server/index.js sasa 2628167 0.7 0.8 1176540 131484 ? Ssl 2025 3672:57 node /home/sasa/voovuu/voovuu-api/starter.js sasa 2663246 2.3 0.7 11848040 129752 ? Ssl Aug23 1065:47 node /home/sasa/kriptus/kriptus-api/starter.js sasa 3168557 0.6 0.7 11841220 120224 ? Ssl 2025 2863:05 node /home/sasa/mikosoft-info/dodo-mikosoft-info/server/index.js sasa 3169051 0.5 0.5 11799488 82948 ? Ssl 2025 2343:54 node /home/sasa/@mikosoft/dodo-examples/server/index.js sasa 3264954 0.6 0.5 1333120 86076 ? Ssl Feb21 2144:26 node /home/sasa/mikosoft-info/api-mikosoft-info/starter.js sasa 3358795 0.6 0.5 1267672 89348 ? Ssl Aug29 238:36 node /home/sasa/miko/miko-hr/api/starter.js sasa 3809381 0.3 0.5 11805988 95836 ? Ssl Sep02 110:14 node /home/sasa/dex8/dex8-worker/starter.js