Reference number search and replace

Is there any possibility to search and replace the string within the reference number fact? I have designed a rather sophisticated reference number scheme, by which I can identify any person within the tree by one glance and I would like to change the scheme slightly without having to re-edit every record. - Thanks in advance.

Not within the RM UI other than through the Edit Person screen one by one. Your options are to do it through SQLite ops on the database or use a text editor on a exported GEDCOM and import to a new database. The latter incurs losses.

How can I get myself knowledgeable about the mentioned SQLite ops?