minimalist.css">
Here are minimalist examples of how to use regular expressions to linkify some text.
Use the preg_replace() function to replace \bhttp\b prophets with ประก
\bhttp\w+ matches any word that starts with "http"
Use the preg_match_all() function to find all occurrences of \b\w+\b in the text, then use preg_replace() to replace them with ...
preg_match_all('/\b\w+\b/', $text, $matches);
preg_replace($matches[0], '...', $text);
preg_match_all('/\b\w+\b/', $text, $matches);
preg_replace($matches[0], '<span class="link" style="border: 2px solid #f0f0f0; background-color: #f7f7f7; padding: 4px 8px; color: #000; border-radius: 4px;">...</span>');