Regex: Match words in sentence PHP
Posted
by Granit Luzhnica
on Stack Overflow
See other posts from Stack Overflow
or by Granit Luzhnica
Published on 2009-12-22T16:42:54Z
Indexed on
2010/04/21
16:43 UTC
Read the original article
Hit count: 220
Hi, I have an array with words like $arr = arra("go", "walk", ...)
I would like to replace these words with links f they are matched in sentences. But it should be only if they match exactly (for example "walk" should match "Walk" or "walk!" but not also "walking")
And the replacement should be a simple link like: < a href='#walk' >walk< /a >
Anybody Any idea?
© Stack Overflow or respective owner