Hey,
so I am trying to match word in a wall of text and return few words before and after the match. Everything is working, but I would like to ask if there is any way to modify it so it will look for similar words. Hmm, let me show you an example:
preg_match_all('/(?:\b(\w+\s+)\{1,5})?.*(pripravená)(?:(\s+){1,2}\b.{1,10})?/u', $item, $res[$file]);
This code returns a match, but I would like it to modify it so
preg_match_all('/(?:\b(\w+\s+)\{1,5})?.*(pripravena)(?:(\s+){1,2}\b.{1,10})?/u', $item, $res[$file]);
would also return a match. Its slovak language and I tried with range of unicode characters and also with \p{Sk} (and few others) but to no avail. Maybe I just put it in the wrong place, I dont know...
Is something like this possible?
Any help is appreciated