Regex and case sensitivity
Posted: Tue Jun 03, 2003 2:51 pm
I'm putting together a website into which I am incorporating a form of BBCode. I want to use str_replace() to replace the BBCode with the appropriate HTML (or whatever) whenever the page is displayed, as apparently str_replace is quite fast (at least compared to ereg_replace).
However, str_replace is case sensitive. I want people to be able to use caps or lower case as they wish within the BBCode. Is there any way around this? Is there a way to make str_replace case sensitive? If not, I'm happy enough using preg_replace, but apparently that's canse sensitive too. Am I stuck with eregi_replace?
However, str_replace is case sensitive. I want people to be able to use caps or lower case as they wish within the BBCode. Is there any way around this? Is there a way to make str_replace case sensitive? If not, I'm happy enough using preg_replace, but apparently that's canse sensitive too. Am I stuck with eregi_replace?