• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: RegEx to replace all occurrences of text including parantheses in JavaScript

Resolved: RegEx to replace all occurrences of text including parantheses in JavaScript

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I have this string
This is some text (and text), and this is another text (AND TexT), the completion goes here.
I need in JavaScript -using a regex- to replace all occurrences of the string “text (and text)” with “NewText” (case insensitive). so the final result should be
This is some NewText, and this is another NewText, the completion goes here.

Answer:



If you have better answer, please add a comment about this, thank you!

javascript regex
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Best way to create 3d matrix of variables in PULP

24/03/2023

Resolved: Openlayers: Update clusters depending on filter (geometryFunction)

24/03/2023

Resolved: Getting ‘502 Bad Gateway’ while deploying Springboot app in EKS

24/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.