PHP Classes

File: test/js/output.txt

Recommend this page to a friend!
  Classes of Nikos M.   PHP Regex Analyzer and Composer   test/js/output.txt   Download  
File: test/js/output.txt
Role: Documentation
Content type: text/plain
Description: Documentation
Class: PHP Regex Analyzer and Composer
Analyze and compose regular expressions
Author: By
Last change:
Date: 3 years ago
Size: 4,287 bytes
 

Contents

Class file image Download
Regex.VERSION = 1.1.0 Testing Regex.Composer =============================================================== Partial : [_a-z][_a-z0-9]* Composed : /^(?:[_a-z][_a-z0-9]*|(\*\*aabb\*\*).\s|\D+)*\1$/i Expected : /^(?:[_a-z][_a-z0-9]*|(\*\*aabb\*\*).\s|\D+)*?\1$/i Output : { "source": "^(?:[_a-z][_a-z0-9]*|(\\*\\*aabb\\*\\*).\\s|\\D+)*\\1$", "flags": "i", "groups": { "1": 1, "token": 1 }, "pattern": {} } =============================================================== Testing Regex.Analyzer =============================================================== Input : /(?P<named_group>[abcde]+)fgh(?P=named_group)(?# a comment)/i Regular Expression : (?P<named_group>[abcde]+)fgh(?P=named_group)(?# a comment) Regular Expression Flags : i Reconstructed Regular Expression : ([abcde]+)fgh\1 =============================================================== Regular Expression Syntax Tree : { "type": "Sequence", "value": [ { "type": "Group", "value": { "type": "Sequence", "value": [ { "type": "Quantifier", "value": { "type": "CharacterGroup", "value": [ { "type": "Characters", "value": [ "a", "b", "c", "d", "e" ] } ] }, "flags": { "MatchOneOrMore": 1, "min": 1, "max": -1, "isGreedy": 1 } } ] }, "flags": { "NamedGroup": 1, "GroupName": "named_group", "GroupIndex": 1 } }, { "type": "String", "value": "fgh" }, { "type": "Special", "value": "1", "flags": { "BackReference": 1, "GroupName": "named_group", "GroupIndex": 1 } }, { "type": "Comment", "value": " a comment" } ] } =============================================================== Regular Expression (Named) Matched Groups : { "1": 1, "named_group": 1 } =============================================================== Regular Expression Peek Characters : { "positive": [ "a", "b", "c", "d", "e", "A", "B", "C", "D", "E" ], "negative": [] } =============================================================== Regular Expression Minimum / Maximum Length : { "minimum": 5, "maximum": "unlimited" } =============================================================== Regular Expression Sample Match Strings : [ { "sample": "AdfghAd", "match": "yes", "groups": { "1": "Ad", "named_group": "Ad" } }, { "sample": "dcECFGHdcEC", "match": "yes", "groups": { "1": "dcEC", "named_group": "dcEC" } }, { "sample": "bdBFGHbdB", "match": "yes", "groups": { "1": "bdB", "named_group": "bdB" } }, { "sample": "aFGHa", "match": "yes", "groups": { "1": "a", "named_group": "a" } }, { "sample": "bDeFGHbDe", "match": "yes", "groups": { "1": "bDe", "named_group": "bDe" } } ] ===============================================================