PHPackages                             akademiano/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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. akademiano/php-unstructured-text-parser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

akademiano/php-unstructured-text-parser
=======================================

A PHP Class to help extract text out of documents that are not structured in a processing friendly manner

113PHP

Since Nov 16Pushed 8y agoCompare

[ Source](https://github.com/mrdatamapper/php-unstructured-text-parser)[ Packagist](https://packagist.org/packages/akademiano/php-unstructured-text-parser)[ RSS](/packages/akademiano-php-unstructured-text-parser/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

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

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

[![License](https://camo.githubusercontent.com/b39aea99358f50af0c7946774fee36ad5847d48f8bf0324d02785f0be45f0c5c/68747470733a2f2f706f7365722e707567782e6f72672f61796d616e72622f7068702d756e737472756374757265642d746578742d7061727365722f6c6963656e73652e737667)](https://packagist.org/packages/aymanrb/php-unstructured-text-parser)

About this Class
----------------

[](#about-this-class)

This is a PHP Class to help extract text out of documents that are not structured in a processing friendly way. 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 preformatted 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

Current Version
---------------

[](#current-version)

1.2.0

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

[](#installation)

#### 1- Using [composer](https://getcomposer.org/) simply run the following:

[](#1--using-composer-simply-run-the-following)

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

\####2- Clone / Copy the files from this repository to your local libs directory:

```
$ git clone https://github.com/aymanrb/php-unstructured-text-parser.git
```

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

[](#usage-example)

```
