sebastiansulinski / regex-kit
Regex Kit : purpose-made methods for easy string replacement
Installs: 171
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/sebastiansulinski/regex-kit
Requires
- php: >=5.4.0
Requires (Dev)
- phpunit/phpunit: 4.7.*@dev
This package is auto-updated.
Last update: 2025-10-05 21:06:09 UTC
README
Regex Kit : purpose-made handfull of methods for easy string replacement
Usage
Example 1
Find uri's and replace them with anchor tags.
use SSD\RegexKit\Factory;
echo Factory::anchor(
'Visit documentation at http://github.com or for more info use http://google.com',
[
'target' => '_blank'
]
);
Example 2
Find @User
and replace them with anchor tags.
use SSD\RegexKit\Factory;
echo Factory::atUser(
'Hey @JohnDoe, thanks for sorting this out!',
'/user/',
[
'target' => '_blank',
'title' => 'View user profile'
]
);