PHP Classes

PHP RegEx: Search and match text using regular expressions.

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-10 (8 months ago) RSS 2.0 feedNot enough user ratingsTotal: 695 All time: 4,712 This week: 54Up
Version License PHP version Categories
regex 1.0.10GNU General Publi...5PHP 5, Text processing
Description 

Author

This class can be used to search and match text using regular expressions.

It provides several static functions that can be used to perform several types of operations with text strings and regular expressions.

Currently it can test if a regular expression is valid, find if a text matches one or more regular expressions, replace parts of a text string that match a regular expression, split a string using a regular expression to define the separator format, count words in a string separated by white spaces.

The class has several static variables with pre-defined regular expressions for matching text in common formats like: white space, line breaks, alphabetic strings, numeric strings, hexadecimal strings, US social security numbers, US zip codes, US states, US dollar amounts, date and time, file paths, Mac and IP addresses, URLs, email addresses, HTML tags, CSS identifiers, MIME types, mobile user agents, etc..

Picture of Ore Richard Muyiwa
  Performance   Level  
Name: Ore Richard Muyiwa <contact>
Classes: 6 packages by
Country: Nigeria Nigeria
Age: 31
All time rank: 13124 in Nigeria Nigeria
Week rank: 49 Up4 in Nigeria Nigeria Equal
Innovation award
Innovation award
Nominee: 3x

Details

Regex

With RegEx, you can find ready-made full functioning regex solutions to many thing we usually struggle to "regex". It is a good replacement for php preg. It provides an interface to test a regex, perform match, replace, perform a deep replace, split a string, count words in a string, find ocuurences of a regex in anything(e.g. find a url in an email), perform a javascript-like regex.test() function.


  Files folder image Files (2)  
File Role Description
Plain text file regex.php Class Main class
Accessible without login Plain text file README.md Data Auxiliary data

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:695
This week:0
All time:4,712
This week:54Up