Regular replace does not work with multiple single quotes
-
I had to make some fast inserts for another table so i prepared them as outputs of sql query in pgadmin.
pgAdmin adds single quote when copying data from the cell but it also adds one single quote when there was one already inside cell value so i get following when copying from pgAdmin gui'insert into db.table(parent_id, active, code, name) values (1, true, ''code'',''name'');'Now when i copy that and paste it to n++ and do the normal find plus normal replace and want to replace all
''with'it only replaces first occurence of the''
Is this a bug?-—
moderator note: added ``` plaintext (code) tags around the example text -
@mscislawin said in Regular replace does not work with multiple single quotes:
when i copy that and paste it to n++ and do the normal find plus normal replace and want to replace all ‘’ with ’ it only replaces first occurence of the ‘’
Did you click Replace or did you click Replace All after setting up Find what:
''and Replace With:'?Because

=>

'insert into db.table(parent_id, active, code, name) values (1, true, ''code'',''name'');' 'insert into db.table(parent_id, active, code, name) values (1, true, ''code'',''name'');' 'insert into db.table(parent_id, active, code, name) values (1, true, ''code'',''name'');' 'insert into db.table(parent_id, active, code, name) values (1, true, ''code'',''name'');' 'insert into db.table(parent_id, active, code, name) values (1, true, ''code'',''name'');'=>
'insert into db.table(parent_id, active, code, name) values (1, true, 'code','name');' 'insert into db.table(parent_id, active, code, name) values (1, true, 'code','name');' 'insert into db.table(parent_id, active, code, name) values (1, true, 'code','name');' 'insert into db.table(parent_id, active, code, name) values (1, true, 'code','name');' 'insert into db.table(parent_id, active, code, name) values (1, true, 'code','name');'It does exactly what I’d expect
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login