PHPackages                             git-mz/tagmatch - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. git-mz/tagmatch

ActiveLibrary

git-mz/tagmatch
===============

v1.0.0(4y ago)06PHP

Since Jul 30Pushed 4y ago1 watchersCompare

[ Source](https://github.com/git-mz/tagmatch)[ Packagist](https://packagist.org/packages/git-mz/tagmatch)[ RSS](/packages/git-mz-tagmatch/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

tagmatch
========

[](#tagmatch)

> 文本关键词匹配程序,一般的匹配方式。

### 使用场景

[](#使用场景)

```
v1.0.0
文本中匹配指定词组，替换为带链接的标签

```

### 使用方法

[](#使用方法)

1、引入包

```
composer require git-mz/tagmatch
```

2、调用

```
use tagmatch\main;

$main    = new Main();
$content = '我会脚踏云朵，哦不，是七彩云朵去娶你！';
$tags = [
    ['word' => '云朵',      'url' => 'www.yunduo.com'],
    ['word' => '七彩云朵',  'url' => 'www.qicaiyunduo.com'],
];

// 获取匹配到的tags
$res = $main::init()
     ->setTree($tags)
     ->getTagWord($content);

// 替换匹配到的tags
$res = $main::init()
     ->setTree($tags)
     ->replace($content, $newclass = '');
```

3、方法说明

```
v1.0.0
    getTagWord(String content, Int wordNum)
    //获取文本中匹配到的标签
    replace(String content, String newclass, Int replaceOne)
    //匹配替换文本中的标签
```

### 小结一下

[](#小结一下)

> 好好学习，天天向上！ 代码不定期迭代...

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1752d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/88199eb8e0759bb9de146534af7fa09365b34badbf8b3069ea8aa321faca6dc5?d=identicon)[git-mz](/maintainers/git-mz)

---

Top Contributors

[![git-well](https://avatars.githubusercontent.com/u/12929614?v=4)](https://github.com/git-well "git-well (27 commits)")

### Embed Badge

![Health badge](/badges/git-mz-tagmatch/health.svg)

```
[![Health](https://phpackages.com/badges/git-mz-tagmatch/health.svg)](https://phpackages.com/packages/git-mz-tagmatch)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
