Giter Site home page Giter Site logo

Comments (5)

ayoisaiah avatar ayoisaiah commented on June 19, 2024

@mo-han You mean like this?
image

from f2.

mo-han avatar mo-han commented on June 19, 2024

you are correct. but i'm still confused by this:

command line:
f2 -f "(.+ (\d{4}-\d\d-\d\d) (\d+)(?:_p\d+) (.+) @.+)" -r "$2 $3 $4 @/$1"

filenames example:

pixiv 2015-03-28 49517590 尻 @ひきとぐ 49517590_p0.jpg
pixiv 2015-03-28 49517590_p0 尻 @ひきとぐ 49517590_p0.jpg

the (?:_p\d+) part mismatch the first one, but it should match both, or not?

(anyway it's probably not issue of f2, but i'm just very confused)

from f2.

ayoisaiah avatar ayoisaiah commented on June 19, 2024

@mo-han You need a question mark after the (?:_p\d+) part to indicate that its optional:

image

from f2.

mo-han avatar mo-han commented on June 19, 2024

I've totally misunderstood this syntax. Thank you!

from f2.

ayoisaiah avatar ayoisaiah commented on June 19, 2024

Happens to us all :)

Would recommend using https://regex101.com/ to debug your regex. Just make sure to select the Golang variant in the sidebar

from f2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.