स्ट्रिंग के दो हिस्सों के बीच के टेक्स्ट को हटाने के लिए, जावास्क्रिप्ट रेगेक्स का उपयोग करें।
उदाहरण
पैरेंथेसिस के बीच टेक्स्ट हटाना सीखने के लिए निम्नलिखित कोड चलाएं:
<html> <head> <script> var str = "Welcome to Qries (website)"; document.write(str); // Removing text between parentheses document.write("<br>"+str.replace(/ *\([^)]*\) */g, "")); </script> </head> <body> </body> </html>आउटपुट
