I was working on some search and replace from files using an editor. For that, I need a regular expression to use in Sublime text or any editor to search the function with a single parameter in all the files.
I tried with some regex, But those are returning the functions with both parameters.
Here are some functions with different parameters.
1. __("abc", "def");
2. __("ghi");
3. __("jkl");
4. __("mno", "pqr", "stu");
5. __("vwx", "yz");
From the above functions, I just need to find out the 2nd and 3rd functions after doing the regex.
Here is what I have done to find those single parameter function.
__\("(.*?)"\)
I just used the above regex to find in files but it returned all the functions with more than one parameter. Please find the image below so that you will get an exact picture of what I have done.
Can anyone help me to find a regex to search in files to find out function with a single parameter? I hope there is a logic with that comma separation. But everything I have done is not working at all.
Thanks in Advance.