承接 ladromelaboratoire/regexp 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ladromelaboratoire/regexp

最新稳定版本:0.0.3

Composer 安装命令:

composer require ladromelaboratoire/regexp

包简介

Collection of usefull regexp

README 文档

README

Collection d'expressions régulières utiles, disponibles sous la forme d'un module PHP composer.

Regex collection provied as a Composer module. This is provided for various countries when applicable : France, Germany, Belgium, Europe, US.
This is not (yet) a full list however.

Regex types

  • Company IDs
    • French IDs
    • EORI
    • LEI
  • Date & time
  • E-mail
  • Hashes
  • IBAN
  • License plates
  • Personal IDs
    • French NIR
  • Phone numbers
  • Street number
  • URL & IP
  • VAT number
  • Zip codes

Sample regexp

//EU VAT number - updates in php file
^(DE\d{9}|ATU\d{8}|BE0\d{9}|BG\d{9,10}|CY[0-9A-Z]{9}|HR\d{11}|DK\d{8}|ES[0-9A-Z]{1}\d{7}[0-9A-Z]{1}|EE\d{9}|FI\d{8}|FR[0-9A-Z]{2}\d{9}|EL\d{9}|HU\d{8}|IE\d{7}[A-Z]{1,2}|IT\d{11}|LV\d{11}|LT\d{9,12}|LU\d{8}|MT\d{8}|NL[\dB]{11}|PL\d{10}$

Usage

More examples are provided in test script.

With Composer

Add the module as a dependency in your projet composer.json and start a composer update through CLI.
Just call the regexp as follow

require '../vendor/autoload.php';
use ladromelaboratoire\regexp\regexp;
$result = preg_match(regexp::EMAIL_INTL, 'my-string_to.test@sub.server.verylongtld');

Without composer

require 'path/to/regexp.php';
$result = preg_match(regexp::EMAIL_INTL, 'my-string_to.test@sub.server.verylongtld');

Dependency

  • PHP >= 7.3
  • Composer

Contribution

Please have a look to contribution guide

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2022-11-08