Skip to content

Instantly share code, notes, and snippets.

@iamandrewluca iamandrewluca/README.md
Last active Aug 6, 2019

Embed
What would you like to do?
Grep l10n labels from project
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 with l10n(' 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 match
  • src/ 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.