/**
* 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.2 1308320 46976 ? Ssl 2025 1698:10 node /home/sasa/dex8/dex8-panel/server/index.js sasa 1236 0.5 0.4 11822652 74268 ? Ssl 2025 2681:39 node /home/sasa/mikosoft_hr/www-mikosoft-hr/server/index.js sasa 1257 0.3 0.2 1306008 45128 ? Ssl 2025 1719:03 node /home/sasa/mikosoft-info/www-mikosoft-info/server/index.js sasa 1289 0.3 0.2 1301856 42452 ? Ssl 2025 1692:48 node /home/sasa/dex8/dex8-kiosk/server/index.js sasa 1363 4.2 3.2 12260820 532280 ? Ssl 2025 21701:47 node /home/sasa/voovuu/voovuu-pub/server/index.js sasa 1886 8.2 4.2 12377936 698544 ? Ssl 2025 42105:16 node /home/sasa/mikosoft-info/crypto-mikosoft-info/server/index. www-data 233528 0.0 0.0 2608 536 ? S 08:49 0:00 sh -c ps -aux | grep node www-data 233530 0.0 0.0 3304 644 ? S 08:49 0:00 grep node sasa 1214480 0.3 0.5 22311168 91308 ? Ssl 2025 1511:21 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214483 0.3 0.2 1101568 34020 ? Ssl 2025 1393:38 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214536 0.3 0.2 1100804 33852 ? Ssl 2025 1391:43 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214544 0.3 0.2 1102312 35476 ? Ssl 2025 1403:22 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214588 0.3 0.2 1102340 35300 ? Ssl 2025 1396:23 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214617 0.3 0.2 1102208 36084 ? Ssl 2025 1391:18 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214641 0.3 0.2 1166184 33420 ? Ssl 2025 1382:53 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214671 0.3 0.2 1100128 33584 ? Ssl 2025 1376:09 node /home/sasa/dex8/dex8-worker/starter.js sasa 1216489 0.3 0.2 1101816 34740 ? Ssl 2025 1392:14 node /home/sasa/dex8/dex8-worker/starter.js sasa 1399960 0.8 0.5 11809312 86712 ? Ssl Apr20 2226:26 node /home/sasa/dex8/dex8-www/server/index.js sasa 1631573 0.6 0.3 1304132 56304 ? Ssl May31 1238:02 node /home/sasa/.pm2/modules/pm2-logrotate/node_modules/pm2-logr sasa 1824679 0.4 0.3 11798848 55096 ? Ssl Aug15 404:48 node /home/sasa/kriptus/kriptus-panel/server/index.js sasa 2072475 0.7 0.5 1169888 93360 ? Ssl Sep24 217:21 node /home/sasa/voovuu/voovuu-api/starter.js sasa 2075109 8.0 0.5 11712352 95312 ? Ssl Sep24 2369:02 node /home/sasa/dex8/dex8-api/starter.js sasa 2075416 0.6 0.3 1331280 58256 ? Ssl Sep24 194:00 node /home/sasa/mikosoft-info/api-mikosoft-info/starter.js sasa 2448036 1.1 0.8 11856848 131752 ? Ssl Aug21 928:49 node /home/sasa/miko/miko-hr/server/index.js sasa 2663246 2.2 0.6 11854524 105436 ? Ssl Aug23 1679:39 node /home/sasa/kriptus/kriptus-api/starter.js sasa 3168557 0.6 0.4 11833556 78256 ? Ssl 2025 3042:36 node /home/sasa/mikosoft-info/dodo-mikosoft-info/server/index.js sasa 3169051 0.5 0.3 11799488 53460 ? Ssl 2025 2495:41 node /home/sasa/@mikosoft/dodo-examples/server/index.js sasa 3615181 0.6 0.3 1331896 63824 ? Ssl Oct07 69:27 node /home/sasa/miko/miko-hr/api/starter.js sasa 3809381 0.3 0.4 22302408 80008 ? Ssl Sep02 220:26 node /home/sasa/dex8/dex8-worker/starter.js