grep -rhosP "(?<=l10n\(\')([\w\.]+)(?=\'\))" src/
-r
recursive in nested folders and files-h
don't show file names-o
print only matches-s
silent errors-P
activate advanced perl regex(?<=l10n\(\')
must start withl10n('
but don't include in match([\w\.]+)
match any word character or dot and include in match(?=\'\))
must end with')
but don't include in matchsrc/
fodler where to search
Input
<ContentTitle className="my-4 text-white">{l10n('auth.signIn.title')}</ContentTitle>
...
placeholder={l10n('auth.signIn.enterPassword')}
Output
auth.signIn.title
auth.signIn.enterPassword