Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
PCRE (PHP <7.3)

@
^(?<tag>(?:[a-zA-Z]\w*|_\w+))(?<memspec>(?:(?:(?:\s*\.(?:[a-zA-Z]\w*|_\w+)|(?:\s*\[(?:[^,\]]+)(?:,(?:[^,\]]+))*\]))*)(?:(?:\s*\.\d+|\.\s*(?:\s*\[(?:[^,\]]+)\]))?)))?(?<metadataspec>(?:\s*\.\@(?<metadataid>(?:[a-zA-Z]\w*|_\w+))(?<metadatamemspec>(?:(?:(?:\s*\.(?:[a-zA-Z]\w*|_\w+)|(?:\s*\[(?:[^,\]]+)(?:,(?:[^,\]]+))*\]))*)(?:(?:\s*\.\d+|\.\s*(?:\s*\[(?:[^,\]]+)\]))?)))?))?$
@
gm

Description

Locates valid Logix Designer tag operands

Submitted by anonymous - 9 years ago