0

I can find a way to replace a string within quotes but I can not find a way to add quotes to a string with find/replace in notepad++

So I have a .sql file that I copy and pasted a bunch of insert values. The strings are not in quotations like they need to be.

I have the find statement as \s\w{1,} and it works fine for me but if I use "\1" it just replaces with ""

Is there a way to get each string replaced to a string with quotes like STRING replaced to "STRING"

1
  • 1
    Use $0 or \0 or capture your match into a group to use \1 Commented Sep 19, 2016 at 6:39

1 Answer 1

1

In order to replace your STRING with "STRING" in notepade++, you can try this to put in find area \s(\w{1,}) and this "$1" in replace area.

Hope this helps.

Sign up to request clarification or add additional context in comments.

1 Comment

this is the answer, i thought I tried the $1 reference but i think having (\w{1,}) in parenthesis made the difference Thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.