Skip to content

Instantly share code, notes, and snippets.

@farvisun
Created May 13, 2019 05:00
Show Gist options
  • Select an option

  • Save farvisun/de113359c888946da1cf735972ed27a1 to your computer and use it in GitHub Desktop.

Select an option

Save farvisun/de113359c888946da1cf735972ed27a1 to your computer and use it in GitHub Desktop.

Revisions

  1. farvisun created this gist May 13, 2019.
    7 changes: 7 additions & 0 deletions index.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    <?php
    $text = '#سلام_دنیا';
    if(preg_match('/\#([א-תآ-یÀ-ÿ一-龥а-яا-یa-z0-9\-_]{1,50})/iu',$text)){
    echo $text ." is tag\n";
    }else{
    echo $text ." is not tag\n";
    }