kalvn 🐧 · @kalvn
186 followers · 2275 posts · Server mastodon.xyz

PHP Twitter Hashtag Validation Regex · GitHub
gist.github.com/janogarcia/394

Une regex pour valider un hashtag. Implémentation en PHP.

```php
<?php
/**
* PHP Regex to validate a Twitter hashtag
*
* Useful for validating a text input (an HTML form in your CMS or custom application) that must be a valid Twitter hashtag.
* Valid examples: , #_, #_1, , , ,
* Invalid examples: #1, #, -tag, .tag, …
links.kalvn.net/?9aGqkQ

#a #_ #_1 #_a #1a #áéìôü #123hàsh_täg446 #hashtag #hash #shaarli

Last updated 7 years ago