All Projects → saracen → matcher

saracen / matcher

Licence: MIT license
Matcher is a fast path matcher/globber supporting globstar/doublestar

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to matcher

glob-tool
A tool to test globs against sets of test strings quickly and easily for the DigitalOcean Community.
Stars: ✭ 14 (-73.08%)
Mutual labels:  glob, globstar
dots
Implements the wildcard file matching in Go used by golint, go test etc.
Stars: ✭ 26 (-50%)
Mutual labels:  glob
Globbing
Introduction to "globbing" or glob matching, a programming concept that allows "filepath expansion" and matching using wildcards.
Stars: ✭ 86 (+65.38%)
Mutual labels:  glob
Go Zglob
Stars: ✭ 152 (+192.31%)
Mutual labels:  glob
Rollup Plugin Copy
Copy files and folders using Rollup
Stars: ✭ 128 (+146.15%)
Mutual labels:  glob
Draxt
draxt.js – NodeList/jQuery-like package for File System (node.js)
Stars: ✭ 192 (+269.23%)
Mutual labels:  glob
Glob
Glob for C++17
Stars: ✭ 74 (+42.31%)
Mutual labels:  glob
faster-than-walk
Faster recursive directory walk on Python 3
Stars: ✭ 36 (-30.77%)
Mutual labels:  glob
matched
Glob matching with support for multiple patterns and negation. Use `~` in cwd to find files in user home, or `@` for global npm modules.
Stars: ✭ 25 (-51.92%)
Mutual labels:  glob
Xcv
✂️ Cut, Copy and Paste files with Bash
Stars: ✭ 144 (+176.92%)
Mutual labels:  glob
Glob
A C# Glob library for .NET and .NET Core.
Stars: ✭ 142 (+173.08%)
Mutual labels:  glob
Globby
User-friendly glob matching
Stars: ✭ 1,864 (+3484.62%)
Mutual labels:  glob
Unused Files Webpack Plugin
Glob all files that are not compiled by webpack under webpack's context
Stars: ✭ 210 (+303.85%)
Mutual labels:  glob
Findup Sync
Find the first file matching a given pattern in the current directory or the nearest ancestor directory.
Stars: ✭ 94 (+80.77%)
Mutual labels:  glob
koa-ip-filter
koa middleware to filter request IPs or custom ID with glob patterns, array, string, regexp or matcher function. Support custom 403 Forbidden message and custom ID.
Stars: ✭ 23 (-55.77%)
Mutual labels:  glob
Nanomatch
Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but without support for extended globs (extglobs), posix brackets or braces, and with complete Bash 4.3 wildcard support: ("*", "**", and "?").
Stars: ✭ 79 (+51.92%)
Mutual labels:  glob
Micromatch
Contributing Pull requests and stars are always welcome. For bugs and feature requests, please create an issue. Please read the contributing guide for advice on opening issues, pull requests, and coding standards.
Stars: ✭ 1,979 (+3705.77%)
Mutual labels:  glob
Glob Stream
A Readable Stream interface over node-glob.
Stars: ✭ 172 (+230.77%)
Mutual labels:  glob
glob
Pure Nim library for matching file paths against Unix style glob patterns.
Stars: ✭ 58 (+11.54%)
Mutual labels:  glob
rollup-plugin-glob-import
A rollup plugin to use glob-star.
Stars: ✭ 18 (-65.38%)
Mutual labels:  glob

matcher

matcher is similar to path.Match, but:

  • Supports globstar/doublestar (**).
  • Provides a fast Glob function.
  • Supports combining matchers.

Examples

Match

package main

import "github.com/saracen/matcher"

func main() {
    matched, err := matcher.Match("hello/**/world", "hello/foo/bar/world")
    if err != nil {
        panic(err)
    }

    if matched {
        // do something
    }
}

Glob

package main

import "github.com/saracen/matcher"

func main() {
    matches, err := matcher.Glob(context.Background(), ".", matcher.New("**/*.go"))
    if err != nil {
        panic(err)
    }

    // do something with the matches
    _ = matches
}

Glob with multiple patterns

package main

import "github.com/saracen/matcher"

func main() {
    matcher := matcher.Multi(
        matcher.New("**/*.go"),
        matcher.New("**/*.txt"))

    matches, err := matcher.Glob(context.Background(), ".", matcher)
    if err != nil {
        panic(err)
    }

    // do something with the matches
    _ = matches
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].