geekstudent
geekstudent

Reputation: 93

How to remove a character from text using regex in notepad ++?

I have a value in a CSV file like "xx"" where xx is any number. I want to replace it with "xx" using regex in notepad++.

For example:

"20"" to "20"
"4"" to "4"

I am able to find the value using "20"" using ("[0-9][0-9]"") but it doesn't get me "4"". Also, I need to replace it with only a single quote in the end instead of double quotes. ("4" or "04")

Upvotes: 0

Views: 114

Answers (3)

herohuyongtao
herohuyongtao

Reputation: 50707

  • Find: ("[0-9]+")"
  • Replace: $1

Upvotes: 1

P̲̳x͓L̳
P̲̳x͓L̳

Reputation: 3653

Use this regex

Find

(?:("\d+")")

Replace

\1

Upvotes: 1

MDEV
MDEV

Reputation: 10838

Find: "(\d+)""

Replace: "\1"

Or to limit to only 1 or 2 digits:

Find: "(\d{1,2})""

FYI [0-9] == \d

Upvotes: 1

Related Questions