/**
* 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 1310208 75764 ? Ssl 2025 1572:21 node /home/sasa/dex8/dex8-panel/server/index.js sasa 1236 0.5 0.6 11819716 98932 ? Ssl 2025 2482:48 node /home/sasa/mikosoft_hr/www-mikosoft-hr/server/index.js sasa 1257 0.3 0.4 1308516 74156 ? Ssl 2025 1591:27 node /home/sasa/mikosoft-info/www-mikosoft-info/server/index.js sasa 1289 0.3 0.4 1301776 69112 ? Ssl 2025 1567:48 node /home/sasa/dex8/dex8-kiosk/server/index.js sasa 1363 4.2 3.4 12274900 560400 ? Ssl 2025 20160:21 node /home/sasa/voovuu/voovuu-pub/server/index.js sasa 1886 7.5 3.8 12297368 634500 ? Ssl 2025 35757:35 node /home/sasa/mikosoft-info/crypto-mikosoft-info/server/index. sasa 1214480 0.3 0.7 22311168 123704 ? Ssl 2025 1372:31 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214483 0.3 0.3 1102336 65136 ? Ssl 2025 1260:30 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214536 0.3 0.4 1102340 66820 ? Ssl 2025 1258:49 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214544 0.3 0.3 1102056 65428 ? Ssl 2025 1269:11 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214588 0.3 0.4 1102340 65720 ? Ssl 2025 1262:42 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214617 0.3 0.4 1102208 65844 ? Ssl 2025 1258:16 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214641 0.3 0.3 1166184 63660 ? Ssl 2025 1249:46 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214671 0.3 0.3 1100384 64244 ? Ssl 2025 1243:44 node /home/sasa/dex8/dex8-worker/starter.js sasa 1215731 0.9 0.7 11847748 125164 ? Ssl 2025 3459:49 node /home/sasa/dex8/dex8-api/starter.js sasa 1216489 0.3 0.3 1101816 63984 ? Ssl 2025 1258:50 node /home/sasa/dex8/dex8-worker/starter.js www-data 1261640 0.0 0.0 2608 600 ? S 07:11 0:00 sh -c ps -aux | grep node www-data 1261642 0.0 0.0 3304 716 ? S 07:11 0:00 grep node sasa 1399960 0.8 0.6 11807608 109116 ? Ssl Apr20 1882:48 node /home/sasa/dex8/dex8-www/server/index.js sasa 1631573 0.5 0.4 1303456 79612 ? Ssl May31 792:01 node /home/sasa/.pm2/modules/pm2-logrotate/node_modules/pm2-logr sasa 1824679 0.4 0.5 11798848 84196 ? Ssl Aug15 215:19 node /home/sasa/kriptus/kriptus-panel/server/index.js sasa 2448036 1.4 0.9 11856308 157108 ? Ssl Aug21 540:14 node /home/sasa/miko/miko-hr/server/index.js sasa 2628167 0.7 0.7 1176796 129320 ? Ssl 2025 3602:28 node /home/sasa/voovuu/voovuu-api/starter.js sasa 2663246 2.4 0.7 11845788 127092 ? Ssl Aug23 860:45 node /home/sasa/kriptus/kriptus-api/starter.js sasa 3168557 0.6 0.6 11825348 100748 ? Ssl 2025 2784:27 node /home/sasa/mikosoft-info/dodo-mikosoft-info/server/index.js sasa 3169051 0.5 0.5 11799488 82936 ? Ssl 2025 2292:29 node /home/sasa/@mikosoft/dodo-examples/server/index.js sasa 3264954 0.6 0.5 1333376 87024 ? Ssl Feb21 2075:04 node /home/sasa/mikosoft-info/api-mikosoft-info/starter.js sasa 3358795 0.6 0.5 1266904 89372 ? Ssl Aug29 171:24 node /home/sasa/miko/miko-hr/api/starter.js sasa 3809381 0.3 0.5 11804964 94088 ? Ssl Sep02 74:22 node /home/sasa/dex8/dex8-worker/starter.js