/**
* 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 1194 0.4 0.5 1306020 84868 ? Ssl 2025 1128:28 node /home/sasa/.pm2/modules/pm2-logrotate/node_modules/pm2-logr sasa 1208 0.3 0.4 1304744 73140 ? Ssl 2025 811:07 node /home/sasa/dex8/dex8-panel/server/index.js sasa 1224 0.7 0.7 11836088 116440 ? Ssl 2025 1794:13 node /home/sasa/dex8/dex8-www/server/index.js sasa 1236 0.5 0.6 11820560 108488 ? Ssl 2025 1283:20 node /home/sasa/mikosoft_hr/www-mikosoft-hr/server/index.js sasa 1257 0.3 0.4 1304664 73292 ? Ssl 2025 823:31 node /home/sasa/mikosoft-info/www-mikosoft-info/server/index.js sasa 1289 0.3 0.4 1297836 68016 ? Ssl 2025 809:40 node /home/sasa/dex8/dex8-kiosk/server/index.js sasa 1363 4.5 3.2 12212236 525460 ? Ssl 2025 10287:00 node /home/sasa/voovuu/voovuu-pub/server/index.js sasa 1886 3.4 2.2 12040508 366556 ? Ssl 2025 7752:29 node /home/sasa/mikosoft-info/crypto-mikosoft-info/server/index. sasa 1214480 0.3 0.7 22311168 125424 ? Ssl 2025 526:17 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214483 0.3 0.4 1101568 65768 ? Ssl 2025 452:19 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214536 0.3 0.4 1102596 68236 ? Ssl 2025 451:08 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214544 0.3 0.4 1102312 66224 ? Ssl 2025 454:15 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214588 0.3 0.3 1100804 64232 ? Ssl 2025 452:11 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214617 0.3 0.3 1100928 65360 ? Ssl 2025 450:56 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214641 0.3 0.3 1100392 64728 ? Ssl 2025 444:26 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214671 0.3 0.3 1100128 63572 ? Ssl 2025 442:44 node /home/sasa/dex8/dex8-worker/starter.js sasa 1215731 0.6 0.7 11709624 124280 ? Ssl 2025 922:33 node /home/sasa/dex8/dex8-api/starter.js sasa 1216489 0.3 0.3 1100536 64408 ? Ssl 2025 450:31 node /home/sasa/dex8/dex8-worker/starter.js sasa 2509059 0.5 0.6 11804952 99336 ? Ssl Feb14 372:44 node /home/sasa/miko/miko-hr/server/index.js sasa 2628167 0.8 0.8 1177176 133072 ? Ssl 2025 1819:17 node /home/sasa/voovuu/voovuu-api/starter.js sasa 3168557 0.6 0.6 11824456 101344 ? Ssl 2025 1302:12 node /home/sasa/mikosoft-info/dodo-mikosoft-info/server/index.js sasa 3169051 0.5 0.5 11799176 85228 ? Ssl 2025 1070:44 node /home/sasa/@mikosoft/dodo-examples/server/index.js sasa 3193472 0.3 0.3 1098844 63168 ? Ssl 04:03 1:59 node /home/sasa/dex8/dex8-worker/starter.js www-data 3239081 0.0 0.0 2608 592 ? S 14:12 0:00 sh -c ps -aux | grep node www-data 3239083 0.0 0.0 3304 720 ? S 14:12 0:00 grep node sasa 3264954 0.6 0.5 1331108 84572 ? Ssl Feb21 347:44 node /home/sasa/mikosoft-info/api-mikosoft-info/starter.js