capture

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Matches      []string `pflag:"前置匹配(子串包含)"`
	Capture      string   `pflag:"匹配正则(优先级比锚点高)"`
	CaptureGroup int      `pflag:"捕获组序号"`

	AnchorStart string `pflag:"起始锚点(在capture为空时有效)"`
	AnchorEnd   string `pflag:"终止锚点(在capture为空时有效)"`
	// contains filtered or unexported fields
}

Config defines the config to capture a sub string from a string

func (Config) CaptureString

func (p Config) CaptureString(s string) (string, error)

CaptureString captures string by config.

func (*Config) Setup

func (p *Config) Setup() error

Setup setup the Post p.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL