Example:
preg_match_all('/example\.com\/lamp\/(\w+)/i', $string, $matches);
What I want:
- It should look for “lamp” but also for let’s say for “car”.
- It should contain “lamp” OR “car”
I know this is simple and I should have use google.
But I did not know what I should google.
You can use the
|sign to match one of many possible strings.