
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
astral-regex
Advanced tools
The astral-regex npm package is designed to provide a regular expression for matching astral symbols in text. Astral symbols are Unicode symbols that consist of a pair of surrogate halves and are used to represent characters outside the Basic Multilingual Plane (BMP). This package is particularly useful for applications that need to process, validate, or manipulate text containing such symbols, ensuring compatibility with the full range of Unicode characters.
Matching astral symbols
This feature allows you to match and extract astral symbols from a string of text. The code sample demonstrates how to use the package to find astral symbols within a given string. In this example, the astral symbol '𠮷' is successfully matched and extracted from the text.
"𠮷野家".match(astralRegex()); // Returns ['𠮷']
The emoji-regex package provides a regular expression to match Unicode emoji characters. While astral-regex is focused on matching any astral symbol, emoji-regex specializes in emojis, which are a subset of astral symbols. This makes emoji-regex more suitable for applications specifically dealing with emoji processing.
XRegExp is an extended JavaScript regex library that, among other enhancements, provides support for Unicode including astral symbols. Compared to astral-regex, XRegExp offers a broader range of regex features and capabilities, making it a more versatile choice for complex text processing tasks that require beyond basic astral symbol matching.
Regular expression for matching astral symbols
$ npm install astral-regex
const astralRegex = require('astral-regex');
astralRegex({exact: true}).test('🦄');
//=> true
'foo 🦄 💩 bar'.match(astralRegex());
//=> ['🦄', '💩']
Returns a RegExp
for matching astral symbols.
Type: Object
Type: boolean
Default: false
(Matches any astral symbols in a string)
Only match an exact string. Useful with RegExp#test()
to check if a string is a astral symbol.
MIT © Kevin Mårtensson
FAQs
Regular expression for matching astral symbols
The npm package astral-regex receives a total of 17,697,597 weekly downloads. As such, astral-regex popularity was classified as popular.
We found that astral-regex demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.