Full disclaimer, I learnt 90% of the regex I know today!
I'm trying to match the last three characters of the PR title. Specifically, an ellipsis to find out if GitHub truncated the PR title.
The rule I have is:
"title": [
{
"pattern": ".*[...]$",
"message": "Please shorten your title so GitHub doesn't truncate it."
}
],
I would expect it to match "My title..."
It matches "My...title" (that's where my poor regex skills might be at fault).
It also matches "My title ...X" where X is any single character including space but NOT including a fourth period.
I've tried various formulations of the regex pattern (most of them simpler), all with the same result. I've tried using "abc" instead of "..." and get the same thing. It seems to never match three characters if those are the last three.
Full disclaimer, I learnt 90% of the regex I know today!
I'm trying to match the last three characters of the PR title. Specifically, an ellipsis to find out if GitHub truncated the PR title.
The rule I have is:
I would expect it to match "My title..." It matches "My...title" (that's where my poor regex skills might be at fault). It also matches "My title ...X" where X is any single character including space but NOT including a fourth period.
I've tried various formulations of the regex pattern (most of them simpler), all with the same result. I've tried using "abc" instead of "..." and get the same thing. It seems to never match three characters if those are the last three.