This question already has an answer here:
- Simulating LIKE in PHP 4 answers
I have an application receiving search requests using the syntax of a database LIKE
notation (ex: %someth_ng%
), but I must be able to apply this search not only to a database (which is straightforward), but to strings in my application, which is in PHP.
I'm thinking that using a regex is probably the best way to do this, but I'd like to see what solutions other people can/have come up with.
</div>