In this article, we will explain how to use Regular Expressions (Reg Ex) for daily use. We will be using RegEx with multiple tools.
1. Regular Expressions in Notepad++
A. Case 1: Removing the last comma in the document
e.g. Abc,,Pqr
XYZ,ABC,
DWD, XXX,
Regex: ,(?! )$ (This will detect the last comma in each statement)
B. Cae2: Remove duplicate values
Regex: ^(.*?)$\s+?^(?=.*^\1$)
To remove duplicate lines just press Ctrl + F and provide RegEx mentioned above.
No comments:
Post a Comment
Please do not enter any spam link in the comment box.