Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^\s+?<template>\s+<name>(?!.*(Windows|Linux)).+\s+<\/template>$
/
gm

Description

Edit xml blocks with exceptions with regex.

Submitted by Inc321 - 3 years ago