Quantcast
Channel: How to do | naveenOS
Viewing all articles
Browse latest Browse all 6

How to replace string in parentheses using regex

0
0

PHP, Java and other languages provide replace all functionality to replace any character by any specific character. But REGEX is best method to replace or remove any specific value using pattern. Suppose, we have input string is $xyz = "This is my best (friend)"; and we want to remove words from “()”. So it so straight forward and simply: "\\(.+?\\)" That’s [...]

The post How to replace string in parentheses using regex appeared first on naveenos group.


Viewing all articles
Browse latest Browse all 6

Latest Images

Trending Articles





Latest Images