PHPackages                             aymanrb/php-unstructured-text-parser - 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. aymanrb/php-unstructured-text-parser

ActiveLibrary

aymanrb/php-unstructured-text-parser
====================================

A PHP library to help extract text out of text documents

v3.1.0(1mo ago)4622.4k↓33.3%20[1 issues](https://github.com/aymanrb/php-unstructured-text-parser/issues)MITPHPPHP ^8.1CI passing

Since Nov 2Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/aymanrb/php-unstructured-text-parser)[ Packagist](https://packagist.org/packages/aymanrb/php-unstructured-text-parser)[ Docs](https://github.com/aymanrb/php-unstructured-text-parser)[ RSS](/packages/aymanrb-php-unstructured-text-parser/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (20)Used By (0)

Unstructured Text Parser \[PHP\]
================================

[](#unstructured-text-parser-php)

[![Tests](https://github.com/aymanrb/php-unstructured-text-parser/actions/workflows/php.yml/badge.svg)](https://github.com/aymanrb/php-unstructured-text-parser/actions/workflows/php.yml)[![Latest Stable Version](https://camo.githubusercontent.com/1313fa43bc77652ba524662a9005991ec505a915f8df410abb96754a06f937d8/68747470733a2f2f706f7365722e707567782e6f72672f61796d616e72622f7068702d756e737472756374757265642d746578742d7061727365722f762f737461626c652e737667)](https://packagist.org/packages/aymanrb/php-unstructured-text-parser)[![Total Downloads](https://camo.githubusercontent.com/e91da32075dfe3b3afc381dc97573415552bf7a63d2035caa025c5233060394c/68747470733a2f2f706f7365722e707567782e6f72672f61796d616e72622f7068702d756e737472756374757265642d746578742d7061727365722f646f776e6c6f616473)](https://packagist.org/packages/aymanrb/php-unstructured-text-parser)[![License](https://camo.githubusercontent.com/b39aea99358f50af0c7946774fee36ad5847d48f8bf0324d02785f0be45f0c5c/68747470733a2f2f706f7365722e707567782e6f72672f61796d616e72622f7068702d756e737472756374757265642d746578742d7061727365722f6c6963656e73652e737667)](https://packagist.org/packages/aymanrb/php-unstructured-text-parser)

About Unstructured Text Parser
------------------------------

[](#about-unstructured-text-parser)

This is a small PHP library to help extract text out of documents that are not structured in a processing friendly format. When you want to parse text out of form generated emails for example you can create a template matching the expected incoming mail format while specifying the variable text elements and leave the rest for the class to extract your pre-formatted variables out of the incoming mails' body text.

Useful when you want to parse data out of:

- Emails generated from web forms
- Documents with definable templates / expressions

Installation
------------

[](#installation)

PHP Unstructured Text Parser is available on [Packagist](https://packagist.org/packages/aymanrb/php-unstructured-text-parser) (using semantic versioning), and installation via [Composer](https://getcomposer.org) is recommended.

Requirements:

- PHP 8.1 or newer

Install it with Composer:

```
composer require aymanrb/php-unstructured-text-parser
```

[Usage example](https://github.com/aymanrb/php-unstructured-text-parser/blob/master/examples/run.php)
-----------------------------------------------------------------------------------------------------

[](#usage-example)

```
