Skip to content

Instantly share code, notes, and snippets.

@appcypher
Last active February 5, 2022 08:28
Show Gist options
  • Save appcypher/7074d219493fa2711c36b2d19fe75eb9 to your computer and use it in GitHub Desktop.
Save appcypher/7074d219493fa2711c36b2d19fe75eb9 to your computer and use it in GitHub Desktop.
* and ** patterns

*

/apps/* =>
    positive: /apps/foo, /apps/bar
    negative: /apps/foo/, /apps/, /apps/foo/bar
    
/apps/*/qux =>
    positive: /apps/foo/qux, /apps/bar/qux
    negative: /apps/foo/qux/, /apps/foo/bar/qux
    
/apps* =>
    positive: /appsmith
    negative: /apps/
    
/apps*th =>
    positive: /appsmith, /appsmithsmith
    negative: /apps/, /appsth, /apps/th

**

/apps/** =>
    positive: /apps/foo, /apps/foo/bar, /apps/bar/
    negative: /apps/
    
/apps/**/qux =>
    positive: /apps/foo/qux, /apps/foo/bar/qux, /apps/bar/qux
    negative: /apps/, /apps/bar/qux/, /appsmithqux
    
/apps** =>
    positive: /appsmith, /appsmith/ereens, /apps/
    negative: /apps
    
/apps**th =>
    positive: /appsmith, /apps/foo/th, /apps/foo/qux/th, /app/th/th
    negative: /appsth, /apps/foo/th/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment