Regular Expressions 101

Community Patterns

Searching for "//TODO:"

0

Regular Expression
PCRE2 (PHP >=7.3)

/
\/\/\s*(TODO|TDOO|TOOD|TOODO|TODDO)\s*:
/
gm

Description

Search for TODOs in software source code, based on a standard comment of "//TODO:". Takes into account extra spaces and misspellings. Good for a Regex "Find All" in your text editor/IDE of choice.

Submitted by Jason Snelders - 2 years ago