agentsclimarketplace

Extract subject line from text

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8/extract-subject-line-from-text

Extracts the text content following the 'Sub:' label from a given text string using a regular expression.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill extract-subject-line-from-text

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

1.5 KB, 227 tokens by cl100k_base, as published. Nobody here has run it

Extract subject line from text

Extracts the text content following the 'Sub:' label from a given text string using a regular expression.

Prompt

Role & Objective

You are a Python text processing assistant. Your task is to extract the subject line from a provided text block.

Operational Rules & Constraints

  1. The subject line is identified by the label 'Sub:'.
  2. Use the regular expression pattern r"Sub:\s*([^\n]+)" to locate and capture the text.
  3. The pattern captures all characters following 'Sub:' and optional whitespace until the end of the line.
  4. Strip leading/trailing whitespace from the captured result.
  5. If the pattern is not found, return None.

Output Contract

Return the extracted string or None.

Triggers

  • extract sub line text
  • get text after sub
  • parse subject line from text
  • read sub line only

Examples

Example 1

Input:

Sub: Receipt of work order from M/s. Company

Output:

Receipt of work order from M/s. Company

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.