> Le 25 nov. 2022 à 17:16, Luca Fascione <l.fasci...@gmail.com> a écrit : > well -3 seems to be matching it, (say in a-3, I'm aware this is a > fingering/articulation mark, not a duration). > It appears to be an attempt to match a signed integer followed by zero or > more dots. > > It sucks that pygments regexes are context free, though.
? What do you mean by context-free? I assume you are not using it in the CS sense of context-free grammars and languages? > This should be using regex capturing and be more like > `[a-g]((?:\d+|\\longa|\\breve)\.*)` or better yet > be more like `[a-g]((?:2|4|8|16|32|64|128|\\longa|\\breve)\.*)`, it's not > like a5 is a valid token... Sorry, I don’t understand your remark. Why would the regex above not work in Pygments and what problem would this regex solve?