
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
treg utilizes trie structured regex patterns to search texts for a potientially large number of words and phrases.
treg utilizes trie structured regex patterns to search texts for a potientially large number of words and phrases.
This project is in an early and experimental state and might be subject substantial changes in the future.
Documentation is available at https://treg.readthedocs.io
from treg import Treg, Phrase, Match
# Initialize a new pattern
treg = Treg()
# Add some phrases
treg.add_phrases([
Phrase(phrase='afternoon tea', meta={'fun': 1}),
Phrase(phrase='tea party', meta={'fun': 3}),
# ...
])
# Compile the pattern
treg.compile()
# Happy searching!
for match in treg.find_iter(
"A long collection of afternoon tea party recipes ...",
overlapped=True):
print(match)
# Output
Match(phrases=[Phrase(phrase='afternoon tea', meta={'fun': 1})], start=16, end=29)
Match(phrases=[Phrase(phrase='tea party', meta={'fun': 3})], start=26, end=35)
FAQs
treg utilizes trie structured regex patterns to search texts for a potientially large number of words and phrases.
We found that treg demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.