Skip to content

Chore: Update JAV Code Parser Regex - #7207

Merged
Gykes merged 6 commits into
stashapp:developfrom
javstash:develop
Sep 10, 2026
Merged

Chore: Update JAV Code Parser Regex#7207
Gykes merged 6 commits into
stashapp:developfrom
javstash:develop

Conversation

@javstash

@javstash javstash commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Description

This pull request updates the JAV code parser regex in the Tagger.

Related issue

Closes #7223

Testing

I have used this regex in several projects including javstash for a few months and it seems to be fine.

Checklist

  • I have read and understood the Contributing document.
  • I have read and understood the AI Usage Policy document.
  • n/a I have made corresponding changes to the documentation (if applicable).

AI Usage Disclosure

Absolutely no AI assistance was used in creating the regex and writing this pull request.

Additional Context

The new regex consists of two non-capturing groups inside a capturing group. The first non-capturing group looks for the prefix and the second non-capturing group looks for the suffix.

Test cases can be found here: https://regex101.com/r/QtGRfg/1

@DogmaDragon DogmaDragon added the noncompliance Doesn't follow the template or other guidelines. label Sep 5, 2026
@Gykes

Gykes commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

@javstash Did you want to fix builds for this?

@javstash
javstash marked this pull request as draft September 9, 2026 20:03
@javstash

Copy link
Copy Markdown
Contributor Author

Seems to build fine now. I have also added (?:\d{3})? to match MGStage codes

https://regex101.com/r/QtGRfg/2

@javstash
javstash marked this pull request as ready for review September 10, 2026 01:10
@Gykes Gykes changed the title Update JAV code parser regex Chore: Update JAV Code Parser Regex Sep 10, 2026
@Gykes Gykes added chore Tedious admin work or code refactoring and removed noncompliance Doesn't follow the template or other guidelines. labels Sep 10, 2026
@Gykes Gykes added this to the Version 0.32.0 milestone Sep 10, 2026
@Gykes

Gykes commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

When I throw the new regex into the regex101 link you provided I get 0 results. We may need to update node first then just go back to your original working version.

@DogmaDragon DogmaDragon added the noncompliance Doesn't follow the template or other guidelines. label Sep 10, 2026
@DogmaDragon

This comment was marked as resolved.

@javstash

Copy link
Copy Markdown
Contributor Author

When I throw the new regex into the regex101 link you provided I get 0 results. We may need to update node first then just go back to your original working version.

The two regex are the same, the one in the PR has \ escaped while the one in regex101 does not

@Gykes

Gykes commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Yea, so I copied the Regex from the diff, pasted it into the URL in the description and none of them matched.

@javstash

Copy link
Copy Markdown
Contributor Author

Yea, so I copied the Regex from the diff, pasted it into the URL in the description and none of them matched.

if you replace every \\ in the diff with \, it should work in regex101.

@Gykes

Gykes commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Still didn't work for me lol. Give it a test and double check I'm not just dumb

@DogmaDragon DogmaDragon removed the noncompliance Doesn't follow the template or other guidelines. label Sep 10, 2026
@javstash
javstash marked this pull request as draft September 10, 2026 18:22
revert fc0a29e which seems to be unnecessary
@javstash
javstash marked this pull request as ready for review September 10, 2026 18:43
@javstash

Copy link
Copy Markdown
Contributor Author

I can confirm the new regex is working as intended with the binary built by the workflow.

Ready for merge

@Gykes

Gykes commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Thanks for that. I also tested and got a similar result. I rechecked the regex101 site and I was dragging in the / at the beginning and was throwing it all off. 🤦

@Gykes
Gykes merged commit d094202 into stashapp:develop Sep 10, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Tedious admin work or code refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement: Update JAV Code parser

3 participants