Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

replace regex javascript

const p = 'Dog dog';
const regex = /Dog/gi;
console.log(p.replace(regex, 'ferret'));
// expected output: "ferret ferret"
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript element distance from top 
Javascript :: us phone number regex 
Javascript :: cors express tutorial 
Javascript :: react apexcharts pie props 
Javascript :: nodejs catch uncaught exception 
Javascript :: faker.js avatar 
Javascript :: how to print numbers from 1 to 100 in javascript 
Javascript :: compare 2 array element 
Javascript :: js generate random numbers 
Javascript :: import all from javascript 
Javascript :: start a react native project with type script 
Javascript :: json file with multiple records 
Javascript :: javascript atualizar pagina 
Javascript :: type of data model mongodb 
Javascript :: angular loop 
Javascript :: serving html file using node.js 
Javascript :: parent of heap node 
Javascript :: expo build ios 
Javascript :: loop over json javascript 
Javascript :: how to send a message using discord.js 
Javascript :: javascript break with for Loop 
Javascript :: add props to jsx element 
Javascript :: js clear a created list 
Javascript :: multiple click events in react 
Javascript :: javascript simulate click on element 
Javascript :: lazy react 
Javascript :: nodejs get param cli 
Javascript :: how to know if a number has a decimal number js 
Javascript :: js call function by string name 
Javascript :: js addeventlistener 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =