Preg_match find regex with or without first capital letter
In my project I need to find a special regex that works if the first letter is uppercase or lowercase. Below are examples of strings:
user = username
User = username
Now I tried this regex:
'/[^\n]user[^\n]*/'
But if the first letter is the capital, this expression finds nothing, so my question is:
What would be the correct regex to find the string containing "user" in it in both cases?
+3
source to share