/**
* 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 1308928 75044 ? Ssl 2025 1478:31 node /home/sasa/dex8/dex8-panel/server/index.js sasa 1236 0.5 0.6 11821508 99388 ? Ssl 2025 2334:37 node /home/sasa/mikosoft_hr/www-mikosoft-hr/server/index.js sasa 1257 0.3 0.4 1307236 74852 ? Ssl 2025 1496:32 node /home/sasa/mikosoft-info/www-mikosoft-info/server/index.js sasa 1289 0.3 0.4 1301520 70244 ? Ssl 2025 1474:24 node /home/sasa/dex8/dex8-kiosk/server/index.js sasa 1363 4.2 3.4 12275868 558508 ? Ssl 2025 18841:16 node /home/sasa/voovuu/voovuu-pub/server/index.js sasa 1886 7.1 3.7 12275928 610836 ? Ssl 2025 31746:05 node /home/sasa/mikosoft-info/crypto-mikosoft-info/server/index. sasa 1214480 0.3 0.7 22311168 124996 ? Ssl 2025 1268:25 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214483 0.3 0.3 1101824 65200 ? Ssl 2025 1160:59 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214536 0.3 0.3 1100548 65244 ? Ssl 2025 1159:24 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214544 0.3 0.4 1102312 65700 ? Ssl 2025 1168:50 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214588 0.3 0.4 1102340 66544 ? Ssl 2025 1162:44 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214617 0.3 0.4 1102208 66444 ? Ssl 2025 1158:42 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214641 0.3 0.3 1165928 64236 ? Ssl 2025 1150:09 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214671 0.3 0.3 1099872 64260 ? Ssl 2025 1144:40 node /home/sasa/dex8/dex8-worker/starter.js sasa 1215731 0.8 0.7 11845564 122700 ? Ssl 2025 2869:53 node /home/sasa/dex8/dex8-api/starter.js sasa 1216489 0.3 0.3 1101560 64488 ? Ssl 2025 1159:06 node /home/sasa/dex8/dex8-worker/starter.js sasa 1399960 0.8 0.7 11856236 130960 ? Ssl Apr20 1595:44 node /home/sasa/dex8/dex8-www/server/index.js sasa 1631573 0.4 0.6 1322928 100072 ? Ssl May31 610:09 node /home/sasa/.pm2/modules/pm2-logrotate/node_modules/pm2-logr sasa 1824679 0.4 0.5 11798848 83104 ? Ssl Aug15 74:44 node /home/sasa/kriptus/kriptus-panel/server/index.js sasa 2448036 1.1 0.8 11878880 143888 ? Ssl Aug21 92:29 node /home/sasa/miko/miko-hr/server/index.js sasa 2628167 0.7 0.7 1176284 130408 ? Ssl 2025 3374:03 node /home/sasa/voovuu/voovuu-api/starter.js sasa 2663246 2.8 0.7 11848688 122032 ? Ssl Aug23 148:59 node /home/sasa/kriptus/kriptus-api/starter.js sasa 2951826 0.3 0.6 22302324 99652 ? Ssl Aug26 5:13 node /home/sasa/dex8/dex8-worker/starter.js sasa 2980607 0.5 0.5 1263128 82864 ? Ssl Aug26 6:12 node /home/sasa/miko/miko-hr/api/starter.js www-data 3063814 0.0 0.0 2608 600 ? S 05:36 0:00 sh -c ps -aux | grep node www-data 3063816 0.0 0.0 3304 720 ? S 05:36 0:00 grep node sasa 3168557 0.6 0.7 11860528 124508 ? Ssl 2025 2604:59 node /home/sasa/mikosoft-info/dodo-mikosoft-info/server/index.js sasa 3169051 0.5 0.5 11799488 83456 ? Ssl 2025 2141:01 node /home/sasa/@mikosoft/dodo-examples/server/index.js sasa 3264954 0.6 0.5 1332936 87092 ? Ssl Feb21 1868:47 node /home/sasa/mikosoft-info/api-mikosoft-info/starter.js