Regular Expressions 101

Sponsors

Library entries

0
pcre2

protocol ip port

no description available
Submitted by 0bel1sk - 2 years ago
0
pcre2

HITs data

no description available
Submitted by xidios - 2 years ago
0
pcre2

HITs mail task

no description available
Submitted by xidios - 2 years ago
0
pcre2

vscode multiline

no description available
Submitted by anonymous - 2 years ago
0
pcre2

Extract cdn images intercom

no description available
Submitted by anonymous - 2 years ago
0
pcre

Acestream ID

no description available
Submitted by nacholopez - 2 years ago
0
pcre2

splitter

no description available
Submitted by anonymous - 2 years ago
0
pcre2

splitter

no description available
Submitted by anonymous - 2 years ago
0
pcre2

Email

no description available
Submitted by anonymous - 2 years ago
0
pcre2

right operations +-*\

no description available
Submitted by xidios - 2 years ago
0
pcre2

Number from Statments

no description available
Submitted by anonymous - 2 years ago
0
pcre2

fcas4

no description available
Submitted by anonymous - 2 years ago
0
pcre2

Date

no description available
Submitted by anonymous - 2 years ago
0
pcre2

Rs Extraction

no description available
Submitted by anonymous - 2 years ago
0
pcre2

mail mil reg

no description available
Submitted by anonymous - 2 years ago

PHP Class Capture Groups from symbol string for Class, Namespace, Operation (Mutator or Accessor), Target and Method Names

Vote

1

Regular Expression
pcre2

/
(?<class>^(?<fully_qualified_class_name>(?<deliniator>(?<!\\)\\(?!\\)(?=(?P>fully_qualified_class_name))){0,1}[A-z_][\w]*)(?=::(?P>method)|$)|^(?<namespace>^(?P>fully_qualified_class_name)*)(?P>deliniator)(?P>fully_qualified_class_name)(?=::(?P>method)|$))(?<scope_resolution_operator>::(?=(?P>method)(?!$)))?(?<method>(?<=::)(?<operation>(?<mutator>[sS]et(?=[A-Z0-1_]|$))|(?<accessor>[gG]et(?=[A-Z0-1_]|$))|(?<condition>[iI]s(?=[A-Z0-1_]|$)|[hH]as(?=[A-Z0-1_]|$)))?_?(?<target>(?<=\w)\w*)|[A-z_]\w*)?$
/
gm

Description

Loading markdown...
Submitted by Jacob Canote - 2 years ago