PHP Classes
elePHPant
Icontem

Regexp Builder: Build regular expressions programmatically

Recommend this page to a friend!
  Info   View files View files (18)   DownloadInstall with Composer Download .zip   Reputation   Support forum (5)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2010-01-09 (6 years ago) RSS 2.0 feedStarStarStarStar 75%Total: 2,643 This week: 1All time: 1,394 This week: 1,047Up
Version License PHP version Categories
regexp-builder 1.0GNU Lesser Genera...4.2PHP 5, Utilities and Tools, Text proc...
Description Author

This class can be used to build regular expressions programmatically.

It provides clearly named functions to add each part of a regular expression, such as matching the beginning or end of the text, match a range of characters, match any text, match a portion of text multiple times, capture a portion of the text, etc..

The resulting regular expression can be applied on a given text string to match.

Changelog:
1.0
- Added replaceWith, replaceWithCallback, split and grep methods
- Fixed bug on characters escape
- Added 6 more tests

0.2
- Fixed bug on conditions using PRECEEDED_BY and NOT_PRECEEDED_BY
- Added 2 more tests

0.1
- first release

Innovation Award
PHP Programming Innovation award nominee
November 2009
Number 3


Prize: One year subscription to the PDF edition of the JSMag magazine
Regular expressions are often used to match text expressions that follow an expected syntax.

However, the syntax of regular expressions is not very trivial to most developers.

This class provides a very developer friendly way to build regular expressions.

Manuel Lemos
Picture of Marco Marchiņ
  Performance   Level  
Name: Marco Marchiņ <contact>
Classes: 3 packages by
Country: Italy Italy
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Files folder imagetests (16 files)
Plain text file regexpBuilder.php Class Class
Accessible without login HTML file documentation.html Doc. Documentation

  Files folder image Files  /  tests  
File Role Description
  Accessible without login Plain text file grep.php Example Grep example
  Accessible without login Plain text file split.php Example Split example
  Accessible without login Plain text file replace_function_unicode.php Example Replace function unicode
  Accessible without login Plain text file replace_function.php Example Replace function example
  Accessible without login Plain text file replace_unicode.php Example Replace unicode
  Accessible without login Plain text file replace.php Example Replace example
  Accessible without login Plain text file email.php Example Email validation
  Accessible without login Plain text file phone.php Example Phone number validation
  Accessible without login Plain text file php_classes_header.php Example Php class header match
  Accessible without login Plain text file sql_datetime.php Example Sql datetime format validation
  Accessible without login Plain text file word_pairs.php Example Word pairs match
  Accessible without login Plain text file unicode.php Example Unicode characters example
  Accessible without login Plain text file condition.php Example Condition test
  Accessible without login Plain text file conditional_pattern.php Example Conditional pattern test
  Accessible without login Plain text file condition2.php Example Condition test 2
  Accessible without login Plain text file condition3.php Example Condition test 3

 Version Control Unique User Downloads Download Rankings  
 0%
Total:2,643
This week:1
All time:1,394
This week:1,047Up
User Ratings User Comments (1)
 All time
Utility:97%StarStarStarStarStar
Consistency:91%StarStarStarStarStar
Documentation:88%StarStarStarStarStar
Examples:91%StarStarStarStarStar
Tests:-
Videos:-
Overall:75%StarStarStarStar
Rank:98
 
thankyou for this class
6 years ago (sandeep nami)
62%StarStarStarStar