-2

For example I would like to change every "hi" to hello The problem is when I try to do it I get into some kind of problems. It translates other words badly like: from "his dog is nice" to "hellos dog is nice" How can I fix it (I am using php)

OvidijusR
  • 158
  • 2
  • 12

1 Answers1

0

You need to use \b around hi:

/\bhi\b/
Wiktor Stribiżew
  • 607,720
  • 39
  • 448
  • 563