ngeor / yak4j-filename-conventions-maven-plugin

A Maven plugin which enforces filename conventions.
MIT License
0 stars 0 forks source link

complex regex #18

Open delanym opened 1 year ago

delanym commented 1 year ago

I can do ^[0-9][0-9][0-9][0-9][0-9]*\.md$ but with ^[0-9]{4,5}\.md$ I get a "Unclosed counted closure near index" error

hiteshbedre commented 1 year ago

To fix the error, you can try escaping the curly braces with backslashes (\{ and \}) like this: ^[0-9]\{4,5\}\.md$. This will ensure that the curly braces are treated as literal characters and not as part of the regex syntax.

Here's the updated regex pattern: ^[0-9]\{4,5\}\.md$

delanym commented 1 year ago

@hiteshbedre what kind of string do you think I'm trying to match?