/**
* 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 1310112 71260 ? Ssl 2025 1636:00 node /home/sasa/dex8/dex8-panel/server/index.js sasa 1236 0.5 0.5 11820592 92972 ? Ssl 2025 2582:51 node /home/sasa/mikosoft_hr/www-mikosoft-hr/server/index.js sasa 1257 0.3 0.4 1306520 68128 ? Ssl 2025 1656:05 node /home/sasa/mikosoft-info/www-mikosoft-info/server/index.js sasa 1289 0.3 0.3 1302112 64864 ? Ssl 2025 1630:38 node /home/sasa/dex8/dex8-kiosk/server/index.js sasa 1363 4.2 3.4 12297928 563516 ? Ssl 2025 21004:44 node /home/sasa/voovuu/voovuu-pub/server/index.js sasa 1886 7.8 4.3 12371700 709696 ? Ssl 2025 38843:56 node /home/sasa/mikosoft-info/crypto-mikosoft-info/server/index. sasa 1214480 0.3 0.7 22311168 118620 ? Ssl 2025 1442:19 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214483 0.3 0.3 1101568 59552 ? Ssl 2025 1327:25 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214536 0.3 0.3 1100804 59792 ? Ssl 2025 1325:38 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214544 0.3 0.3 1102312 60144 ? Ssl 2025 1336:40 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214588 0.3 0.3 1102340 60756 ? Ssl 2025 1329:56 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214617 0.3 0.3 1102208 61104 ? Ssl 2025 1325:08 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214641 0.3 0.3 1166184 58504 ? Ssl 2025 1316:41 node /home/sasa/dex8/dex8-worker/starter.js sasa 1214671 0.3 0.3 1100128 58492 ? Ssl 2025 1310:17 node /home/sasa/dex8/dex8-worker/starter.js sasa 1216489 0.3 0.3 1101304 58952 ? Ssl 2025 1325:53 node /home/sasa/dex8/dex8-worker/starter.js sasa 1399960 0.8 0.7 11843692 127560 ? Ssl Apr20 2060:54 node /home/sasa/dex8/dex8-www/server/index.js sasa 1631573 0.5 0.4 1303552 77120 ? Ssl May31 1029:26 node /home/sasa/.pm2/modules/pm2-logrotate/node_modules/pm2-logr sasa 1824679 0.4 0.4 11799104 79336 ? Ssl Aug15 310:39 node /home/sasa/kriptus/kriptus-panel/server/index.js sasa 2072475 0.8 0.6 1158332 107784 ? Ssl Sep24 76:28 node /home/sasa/voovuu/voovuu-api/starter.js sasa 2075109 12.9 0.6 11716796 111740 ? Ssl Sep24 1214:28 node /home/sasa/dex8/dex8-api/starter.js sasa 2075416 0.6 0.4 1332408 80464 ? Ssl Sep24 59:27 node /home/sasa/mikosoft-info/api-mikosoft-info/starter.js sasa 2448036 1.2 1.0 11900824 169248 ? Ssl Aug21 747:26 node /home/sasa/miko/miko-hr/server/index.js sasa 2663246 2.2 0.7 11847080 124492 ? Ssl Aug23 1268:48 node /home/sasa/kriptus/kriptus-api/starter.js www-data 2864704 0.0 0.0 2608 596 ? S 08:18 0:00 sh -c ps -aux | grep node www-data 2864706 0.0 0.0 3304 720 ? S 08:18 0:00 grep node sasa 3168557 0.6 0.6 11830228 100276 ? Ssl 2025 2923:50 node /home/sasa/mikosoft-info/dodo-mikosoft-info/server/index.js sasa 3169051 0.5 0.4 11799488 77844 ? Ssl 2025 2394:45 node /home/sasa/@mikosoft/dodo-examples/server/index.js sasa 3358795 0.6 0.5 1267804 84596 ? Ssl Aug29 306:05 node /home/sasa/miko/miko-hr/api/starter.js sasa 3809381 0.3 0.6 22299336 99896 ? Ssl Sep02 146:31 node /home/sasa/dex8/dex8-worker/starter.js