DronaBlog

Tuesday, June 23, 2020

Important Regular Expression (RegEx) for daily Use

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.

The Latest Trends in Technology: What’s Shaping the Future in 2025

  Technology continues to evolve at a breakneck pace, reshaping industries, economies, and daily life. As we move through 2025, several tran...