PHP Classes

File: test/python/output.txt

Recommend this page to a friend!
  Classes of Nikos M.   PHP Regex Analyzer and Composer   test/python/output.txt   Download  
File: test/python/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,157 bytes
 

Contents

Class file image Download
Regex Module loaded succesfully Regex.VERSION = 1.1.0 Testing Regex.Composer =============================================================== Partial : [_a-z][_a-z0-9]* Composed : ^(?:[_a-z][_a-z0-9]*|(\*\*aabb\*\*).\s|\D+)*?\1$ Expected : ^(?:[_a-z][_a-z0-9]*|(\*\*aabb\*\*).\s|\D+)*?\1$ Output : { 'flags': <RegexFlag.IGNORECASE: 2>, 'groups': {'1': 1, 'token': 1}, 'pattern': re.compile('^(?:[_a-z][_a-z0-9]*|(\\*\\*aabb\\*\\*).\\s|\\D+)*?\\1$', re.IGNORECASE), 'source': '^(?:[_a-z][_a-z0-9]*|(\\*\\*aabb\\*\\*).\\s|\\D+)*?\\1$'} =============================================================== 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': [ { 'flags': { 'GroupIndex': 1, 'GroupName': 'named_group', 'NamedGroup': 1}, 'type': 'Group', 'value': { 'type': 'Sequence', 'value': [ { 'flags': { 'MatchOneOrMore': 1, 'isGreedy': 1, 'max': -1, 'min': 1}, 'type': 'Quantifier', 'value': { 'type': 'CharacterGroup', 'value': [ { 'type': 'Characters', 'value': [ 'a', 'b', 'c', 'd', 'e']}]}}]}}, {'type': 'String', 'value': 'fgh'}, { 'flags': { 'BackReference': 1, 'GroupIndex': 1, 'GroupName': 'named_group'}, 'type': 'Special', 'value': '1'}, {'type': 'Comment', 'value': ' a comment'}]} =============================================================== Regular Expression (Named) Matched Groups : {'1': 1, 'named_group': 1} =============================================================== Regular Expression Peek Characters : {'negative': [], 'positive': ['a', 'b', 'c', 'd', 'e', 'A', 'B', 'C', 'D', 'E']} =============================================================== Regular Expression Minimum / Maximum Length : {'maximum': 'unlimited', 'minimum': 5} =============================================================== Regular Expression Sample Match Strings : [ { 'groups': {'1': 'decC', 'named_group': 'decC'}, 'match': 'yes', 'sample': 'decCFGHdecC'}, { 'groups': {'1': 'DaE', 'named_group': 'DaE'}, 'match': 'yes', 'sample': 'DaEfghDaE'}, { 'groups': {'1': 'bbEc', 'named_group': 'bbEc'}, 'match': 'yes', 'sample': 'bbEcfghbbEc'}, { 'groups': {'1': 'E', 'named_group': 'E'}, 'match': 'yes', 'sample': 'EFGHE'}, { 'groups': {'1': 'ca', 'named_group': 'ca'}, 'match': 'yes', 'sample': 'cafghca'}] ===============================================================