Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^(CREATE TABLE[^;]*;)
/
gm

Description

Usage: pcre2grep -M -e'^(CREATE TABLE[^;]*?;)' dump.sql > create-tables.sql

Submitted by Daniel J. Post - 2 years ago