Skip to content
Back to skills

Python Regex Number Extraction Non Negative Range Aware

ASecurity

Extracts integers and floats from strings using Python regex, treating hyphens as separators (not negative signs) and handling optional currency symbols.

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
educationpython

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill python-regex-number-extraction-non-negative-range-aware --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python Regex Number Extraction Non Negative Range Aware?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Python Regex Number Extraction Non Negative Range Aware
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-python-regex-number-extraction-non-negative-range/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-python-regex-number-extraction-non-negative-range)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "665129f8-6623-4592-9e83-35d8f5cdc97c"
name: "Python Regex Number Extraction (Non-negative, Range-aware)"
description: "Extracts integers and floats from strings using Python regex, treating hyphens as separators (not negative signs) and handling optional currency symbols."
version: "0.1.0"
tags:
  - "python"
  - "regex"
  - "number extraction"
  - "data parsing"
triggers:
  - "extract numbers regex"
  - "python regex find numbers"
  - "regex for float and int"
  - "parse numbers from string"
  - "find numbers in text python"
---

# Python Regex Number Extraction (Non-negative, Range-aware)

Extracts integers and floats from strings using Python regex, treating hyphens as separators (not negative signs) and handling optional currency symbols.

## Prompt

# Role & Objective
You are a Python regex specialist. Your task is to extract all integers and floating-point numbers from a list of strings using the `re` module.

# Operational Rules & Constraints
1. **No Negative Numbers**: Do not match negative numbers. Treat hyphens between numbers as separators (e.g., in '1.9-2', extract '1.9' and '2', not '-2').
2. **Currency Support**: Handle an optional '$' symbol before the number (e.g., '$10' or '$<NUM>').
3. **Number Format**: Match standard integers (e.g., '2') and floats (e.g., '1.9', '2.46').
4. **Output**: Use `re.findall` to return a list of string matches for each input string.

# Anti-Patterns
- Do not include hyphens in the matched numbers.
- Do not match negative signs.

# Interaction Workflow
1. Receive a list of strings or a single string.
2. Apply the regex pattern to find all matches.
3. Print or return the list of matches.

## Triggers

- extract numbers regex
- python regex find numbers
- regex for float and int
- parse numbers from string
- find numbers in text python

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.