piscibus / php-hashtag
A simple php service for parsing hashtags from a string in any language.
Installs: 1 768
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=8.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.13
- pestphp/pest: ^1.22
- phpunit/phpunit: ^9.5
- psalm/plugin-phpunit: ^0.18.4
- vimeo/psalm: ^5.4
README
This package provides a simple way to extract hashtags from a string in any language.
Installation
You can install the package via composer:
composer require piscibus/php-hashtag
Support us
We invest a lot of resources into creating open source projects. This package is extracted from a bigger project. We are using it in production, and we will continue to maintain it. If you find it useful, please consider supporting us. All kinds of contributions are welcome.
Usage
use Piscibus\PhpHashtag\Extractor; $text = 'This is an #English #text with #hashtags'; $hashtags = Extractor::extract($text); // ['English', 'text', 'hashtags'] // Or you can use the helper function $hashtags = extract_hashtags($text); // ['English', 'text', 'hashtags']
License
This package is open-sourced software licensed under the MIT license.