package source

import (
	
	
	
)

var (
	ErrParse = fmt.Errorf("no match")
)

var (
	DefaultParse = Parse
	DefaultRegex = Regex
)
Regex matches the following pattern: 123_name.up.ext 123_name.down.ext
var Regex = regexp.MustCompile(`^([0-9]+)_(.*)\.(` + string(Down) + `|` + string(Up) + `)\.(.*)$`)
Parse returns Migration for matching Regex pattern.
func ( string) (*Migration, error) {
	 := Regex.FindStringSubmatch()
	if len() == 5 {
		,  := strconv.ParseUint([1], 10, 64)
		if  != nil {
			return nil, 
		}
		return &Migration{
			Version:    uint(),
			Identifier: [2],
			Direction:  Direction([3]),
			Raw:        ,
		}, nil
	}
	return nil, ErrParse