Regular Expressions 101

Community Patterns

Find Translations without textdomain

0

Regular Expression
Python

r"
__\([\s]?'([^']*?)'[\s]?\)
"
g

Description

Rexeg to find translations without textdomain. Primarelly made for Wordpress but you can change expression to include different textdomain wrapper. Currently they are set to:

__(' TEXT $phpvars or anything else ')

I used it in SublimeText to search for lines of PHP code, that's why regex is made for phyton...

Submitted by cure85 - 7 years ago