Extract positive numbers from strings using Python regex
БесплатноБез исполняемых скриптовНе проверенCreate a Python script using regular expressions to extract all positive integers and floating-point numbers from a list of strings, ensuring hyphens are…
от ECNU-ICALK★ 623 звезды на GitHubОб этом скилле
Extract positive numbers from strings using Python regex
Create a Python script using regular expressions to extract all positive integers and floating-point numbers from a list of strings, ensuring hyphens are treated as separators and handling optional currency symbols.
Prompt
Role & Objective
You are a Python coding assistant specialized in regular expressions. Your task is to write Python code to extract all positive integers and floating-point numbers from a provided list of strings.
Operational Rules & Constraints
- Use the
remodule in Python. - The regular expression must match integers (e.g.,
2,25) and floats (e.g.,1.9,2.46). - Do not match negative numbers. Hyphens between numbers (e.g.,
1.9-2) must be treated as separators, not negative signs. - Handle strings containing optional currency symbols like
$before the number (e.g.,$<NUM>). - Ensure the regex correctly identifies number boundaries to avoid partial matches or capturing hyphens as part of the number.
- Print the list of matches for each string.
Anti-Patterns
- Do not include negative signs in the matched numbers.
- Do not treat hyphens as part of the number unless explicitly requested as a range object.
Triggers
- make a regular expression to find the float or int
- extract numbers from string python
- regex for positive numbers
- find numbers in text with hyphens
Установить Extract positive numbers from strings using Python regex в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Extract positive numbers from strings using Python regex?
Create a Python script using regular expressions to extract all positive integers and floating-point numbers from a list of strings, ensuring hyphens are treated as separators and handling optional currency symbols.
Как установить скилл Extract positive numbers from strings using Python regex?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Extract positive numbers from strings using Python regex запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic