Hamid Naghipour
Hamid Naghipour

Reputation: 3635

Find and replace in DB string

I have a DB file. In that file there are many rows that contain phone number like this :

"a",93560050,"b"

I want to surround it with "" to have it like this :

"a","93560050","b"

How can I do this?

Upvotes: 1

Views: 30

Answers (2)

user1109464
user1109464

Reputation: 64

You only need to search like this:

(\d{8})

then you can replace with

"\1" 

so you have the quotation.

Upvotes: 2

Toto
Toto

Reputation: 91498

Because phone mumbers are only numeric and there're no other numbers than phone number, you can do:

  • Ctrl+H
  • Find what: \d+
  • Replace with: "$0"
  • Replace all

Upvotes: 2

Related Questions