Login   Register  
PHP Classes
elePHPant
Icontem

preg_magic: Extract data from text using regular expressions

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author Author  
Picture of Shannon Wynter
Name: Shannon Wynter is available for providing paid consulting. Contact Shannon Wynter .
Packages: 9 Browse all classes by Shannon Wynter Browse all classes by
Country: Australia Australia - PHP jobs in Australia
Age: 32
All time rank: 1232 in Australia Australia
Week rank: 125 Down2 in Australia Australia Equal
Innovation award
Innovation award
Nominee: 3x


  Detailed description   Download Download .zip .tar.gz  
This class can be used to extract data from text using regular expression patterns.

It takes an array of regular expressions that define the patterns to match and extract data.

An entry of the expressions array may be another array that defines patterns of repetitive sections that must be iterated to extract data from each of the repeated sections, like for instance HTML tables with sections of the rows of cell data.

The extracted data patterns is returned in associative arrays.

  Classes of Shannon Wynter  >  preg_magic  >  Download Download .zip .tar.gz  >  Support forum Support forum (1)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: preg_magic
Base name: preg_magic
Description: Extract data from text using regular expressions
Version: 1
PHP version: 5
License: GNU General Public License (GPL)
All time users: 1355 users
All time rank: 2602
Week users: 2 users
Week rank: 1095 Up
 
  Groups   Rate classes User ratings   Applications   Related links   Files Files  

  Groups  
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Text processing Manipulating and validating text data View top rated classes


  Innovation Award  
PHP Programming Innovation award nominee
February 2008
Number 7

Prize: One downloadable copy of Komodo Pro
Regular expressions are often used to extract information from different types of text documents.

Sometimes it is necessary to extract information that appears with the same format in multiple sections of a document, like for instance, text that is presented in multiple rows of HTML table. Extracting data from this kind document may require the use of multiple types of regular expressions.

This class provides a solution to simplify the extraction of text from document with repetitive sections by iterating through a set of given regular expressions.

Manuel Lemos

  User ratings  
RatingsUtility Consistency Documentation Examples Tests Videos Overall Rank
All time: Good (91.7%) Good (91.7%) Good (91.7%) Perfect (100.0%) - - Sufficient (74.2%) 87
Month: Not yet rated by the users

  Applications that use this class  
No application links were specified for this class.
Add link image If you know an application of this package, send a message to the author to add a link here.

  Related links  
Link Description
Class on Fremnet A full description of the class and example on Fremnet.

  Files folder image Files  
File Role Description
Files folder imagedoc (7 files, 2 directories)
Files folder imageexample (3 files)
Accessible without login Plain text file document.sh Data Documentation Generator
Plain text file preg_magic.php Class Main class/function file
Accessible without login Plain text file README Doc. Readme file

  Files  /  Files folder image doc  
File Role Description
Files folder imagemedia (2 files)
Files folder imagepreg_magic (2 files)
  Accessible without login HTML file blank.html Doc. Documentation
  Accessible without login HTML file classtrees_preg_magic.html Doc. Documentation
  Accessible without login HTML file elementindex.html Doc. Documentation
  Accessible without login HTML file elementindex_preg_magic.html Doc. Documentation
  Accessible without login HTML file index.html Doc. Main Documentation Index
  Accessible without login HTML file li_preg_magic.html Doc. Documentation
  Accessible without login HTML file packages.html Doc. Documentation

  Files  /  doc  /  Files folder image media  
File Role Description
  Accessible without login Plain text file banner.css Data CSS for Documentation
  Accessible without login Plain text file stylesheet.css Data CSS for Documentation

  Files  /  doc  /  Files folder image preg_magic  
File Role Description
  Accessible without login HTML file preg_magic.html Doc. Documentation
  Accessible without login HTML file _preg_magic.php.html Doc. Documentation

  Files  /  Files folder image example  
File Role Description
  Accessible without login Plain text file fields_example.php Example An example fields layout
  Accessible without login Plain text file full_example.php Example A complete example
  Accessible without login Plain text file history.html Data Example data

Download Download all files: preg_magic.tar.gz preg_magic.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.