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