Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"""
^[^:]*((array|unassigned)*)[^:]*\n$
"""
ig

Description

Find all lines with the word array OR unassigned except for lines with a ':' COLON character.

Thanks to Kinny on IRC :)

Added some tests.

Submitted by Kinny, rjt - 6 years ago