I have a csv file with fields in format given below ...
ram(tower)america
shyam(t.nagar)japan
john(jam nagar)netherlandi want to change this in format given below
ram","america
shyam","japan
john","netherlandHow can i do this in Notepad++ with regex
12 Answers
Open 'Find and Replace' dialogue box with Ctrl+H in Notepad++. Write the following:
- Find what:
\(.+?\) - Replace with:
","
Syntax used:
- Backward slash and left brace: Find left brace
- Single dot and plus sign: Matches any character
- Backward slash and right brace: Find right brace
Further reading:
- How to find, replace and highlight text in Notepad++
- How to use regular expressions in Notepad++ (tutorial)
In the Notepad++ find/replace dialogue:
Find what:
(.*?)\(.*\)(.*)Replace with:
$1","$2
Here is the screenshot of Notepad++ find/replace dialogue window: