erdalonline/tr-search-and-replace

There is no license information available for the latest version (1.9) of this package.

1.9 2022-11-13 10:41 UTC

This package is auto-updated.

Last update: 2025-08-13 16:28:57 UTC


README

<?php
require_once __DIR__ . '/vendor/autoload.php';

$regex = new TrSearchAndReplace\Text\Replace();

echo $regex->searchAndReplace("Ankara'nın Ankara ya faydası yok!", 'ankara', 'samsun').PHP_EOL;
echo $regex->searchAndReplace("Armut un iyisini ayılar yer", 'armut', 'elma').PHP_EOL;
echo $regex->searchAndReplace("tatil'e Mersin e gittim", 'mersin', 'hatay').PHP_EOL;
echo $regex->searchAndReplace("Bugün yemeği istAnbUl da yiyeceğim", 'istanbul', 'Hatay').PHP_EOL;

Output

samsun'un samsun'a faydası
tatil'e hatay'a gittim
elma'nın iyisini ayılar yer

Yusuf Erdal and Uğur Yıldırım