Recommend this page to a friend! |
Download .zip |
Info | View files (3) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2013-05-20 (3 years ago) | Not enough user ratings | Total: 291 | All time: 7,054 This week: 987 |
Version | License | PHP version | Categories | |||
matcher-class 1.0 | Artistic License | 5.0 | Algorithms, PHP 5, Text processing, V... |
Description | Author | |||
This class can validate values from examples with similar format. Innovation Award
|
String Matcher Class can be used As simple Regular Expression Generator For emails,substrings,etc It has setPattern method Which takes string or array as Example data, for example setPatterns("mye@email.com") will genearete reg exp for email check or setPattern("0.50") generate reg exp for decimal match. There is also MatchAll method which will find all matches by pattern in given string. for example $clas->setPattern("my@gmail.com")->matchAll("Some string with some emails like cool@mail.com or onemore@gmail.com "); will return array of email matches. // Controll methods Method useEachLength(true||false) if set to True will add {1..} Length check for each part of regular Expression Method getRegular() return Generated regualr Expressions; Method caseSens(true||false) set to Generate case sensative regualar expression match or not. ('/i') Method setUseLength(true||false) if set to true add length check at the and of regular expression {10...} so tested string lngth must match to pattern length. Method getSimilar() accpet array of strings Return strings array that are similar to a pattern Method comvertAgains(string ) return array of strings that are transformed against pattern . Method isMatchAll($str) - Return True if one of the Patterns Match in Long text string method SetCorector - > set Arrayt of correction values for comvertAgainst Method .. see Example.php Method setUseNumb(true) - add [0-9] to each Peace of regular expression pattern used when need to match string with numbers Exmple.php - is sets of test that exaplain how it works . |
Files |
File | Role | Description |
---|---|---|
example.php | Example | Exmaple |
MathcerClass.php | Class | Class |
readme.txt | Doc. | Readme |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.