Login   Register  
PHP Classes
elePHPant
Icontem

Class: preg_magic

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Shannon Wynter  >  preg_magic  >  Download .tar.gz .zip  >  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
Related classes: , , , , , ,
Version: 1
PHP version: 5
License: GNU General Public License (GPL)
All time users: 1231 users
All time rank: 2549
Week users: 2 users
Week rank: 1677
Picture of Shannon Wynter
Author: Shannon Wynter is available for providing paid consulting. Contact Shannon Wynter .
Packages: 8 Browse this author's classes Browse this author's classes
Country: Australia Australia - PHP jobs in Australia
Age: 30
All time rank: 1252 in Australia Australia
Week rank: 190 Down3 in Australia Australia Down
Innovation award
Innovation award
Nominee: 3x


  Detailed description  
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.

 

  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

  Rate classes User ratings   Applications   Related links   Files Files  

  Innovation Award  
PHP Programming Innovation award nominee
February 2008
Number 7
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  
Ratings
Utility
Consistency
Documentation
Examples
Tests
Videos
Overall
Rank
All time:
Good (91.7%)
Good (91.7%)
Good (91.7%)
Perfect (100.0%)
-
-
Sufficient (74.2%)
75
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)
Plain text file document.sh Data Documentation Generator
Plain text file preg_magic.php Class Main class/function file
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)
  HTML file blank.html Doc. Documentation
  HTML file classtrees_preg_magic.html Doc. Documentation
  HTML file elementindex.html Doc. Documentation
  HTML file elementindex_preg_magic.html Doc. Documentation
  HTML file index.html Doc. Main Documentation Index
  HTML file li_preg_magic.html Doc. Documentation
  HTML file packages.html Doc. Documentation

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

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

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

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.