Filter By similar words

Guys, actually I just wanted to filter my array by name which are similar or some part of it similar.
I could find its solution maybe you all could help.
Like if I type “Phone” it should get me an array with “Cell Phone” or “Smart Phone”

I would suggest studying regular expressions.

1 Like

i have read them i know i can write “%phone%” but dont know how can i fit that while filtering the array with filter() method.