Search notes:

VBA function: replace

replace(str, search, repl) replaces the substring search with repl in the string str.
option explicit

sub replaceTest()

    dim text, text_new as string
    
    text     = "hello bello world"
    text_new = replace(text, "ll", "xyz")
    
    debug.print("text_new = " & text_new)
  ' text_new = hexyzo bexyzo world.
  
end sub
Github repository about-VBA, path: /functions/replace.bas

See also

For more complex search/replace operations, regular expressions might be used.
functions

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1738607877, '3.145.143.57', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/VBA/functions/replace(55): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78