How to output the match word case insensitive? PHP Code:
if(preg_match("/(?i)(?<= |^)" . $Word . "(?= |$)/", $String)) {
// If Exact Word is Match Case Insensitive
}
Example my string is: Hello there, the Video was funny.
I want to get " Video " from String but because my PHP preg_match is case insensitive and i'm looking for " video " i need to get the output " Video " from the string to.
Another String Example: Hello there, the vIDeo was funny To get the output " vIDeo " from the string.
Another String Example: Hello there, the vIDeowas funny. This String don't need to output " vIDEOwas " because is not match exact word.
I need this script so i can see the way exact words is found on string after search them.