Skip to content

Instantly share code, notes, and snippets.

@maryo
Created December 5, 2018 13:45
Show Gist options
  • Save maryo/e5f02dd410fb58b740d098bad1a6b3c6 to your computer and use it in GitHub Desktop.
Save maryo/e5f02dd410fb58b740d098bad1a6b3c6 to your computer and use it in GitHub Desktop.
Vlna na webu
<?php
function vlna(string $text): string
{
return preg_replace('/([^a-zA-Z0-9])([ksvzaiou])\s([a-zA-Z0-9]{1,})/i', "\$1\$2\xc2\xa0\$3", $text);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment