PHP Classes
elePHPant
Icontem

PHP RegEx: Search and match text using regular expressions.

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2019-08-06 (4 months ago) RSS 2.0 feedNot enough user ratingsTotal: 635 All time: 4,910 This week: 386Up
Version License PHP version Categories
regex 1.0.1GNU 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..

  Performance   Level  
Name: Ore Richard Muyiwa <contact>
Classes: 6 packages by
Country: Nigeria Nigeria
Age: 26
All time rank: 13894 in Nigeria Nigeria
Week rank: 324 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  
File Role Description
Plain text file regex.php Class Main class
Accessible without login Plain text file README.md Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 100%
Total:635
This week:0
All time:4,910
This week:386Up