[KongchangAI]
ConceptRegex / Regular Expression

Regular Expressions

A formal language for describing string matching patterns, widely used in text search, data extraction, and format validation. Regular expressions are supported by mainstream programming languages and tools.

Core Facts

Timeline (last 90 days)

Oct 20

SQL Server 2025's T-SQL directly supports regular expression matching and replacement.

Unverified50%
Oct 20

Domain-specific languages (DSLs) are programming languages designed for a specific problem domain, such as SQL for database queries, regular expressions for text matching, and Verilog for hardware description.

Unverified50%
Oct 19

The regex used by the output guardrail cannot recognize numbers spelled out in words (such as twenty-two thousand), Unicode variants, or line-split fragments, nor can it distinguish legitimate numbers from quotes, so it can only serve as a last net rather than the only line of defense.

Unverified50%
Oct 19

Text is scanned before the message is sent, and if the generated content contains a currency symbol or weight unit immediately adjacent to a number (₹, Rs, INR, rupees, g, gm, grams, tola), sending is blocked.

Unverified50%
Oct 18

In JavaScript/TypeScript regex, ^ by default matches only the start of the string; with the m (multiline) flag added, ^ and $ match the start and end of each line.

Unverified50%
Oct 18

Under the m flag of JavaScript/TypeScript regex, $ matches only the end of a line rather than the end of the string, so the \n inserted by replacement correctly forces a line break after an inline label.

Unverified50%
Oct 18

The TypeScript function normalizeQuickSolutionLabel given in the original article uses the regex /^([\*\_]{2}Quick solution:[\*\_]{2})\s*(.+)$/gm to match labels wrapped in bold or underscore markers at the start of a line and force insertion of a line break.

Unverified50%
Oct 18

A practical development principle is: test determinism first, then talk about prompts. If a failure reproduces stably, the problem lies in task design or tool selection rather than prompt wording, and in that case introducing regexes, parsers or structured output constraints is often more effective.

Unverified50%
Oct 18

When extracting order information from WhatsApp chat logs, a single regular expression is more stable than a carefully designed prompt, especially for patterned fields such as amounts, dates and product numbers.

Unverified50%
Oct 17

schemagate achieved an F1 of 0.83 in a 200-question pilot test, and 32 of the 33 false rejections stemmed from a regex bug: the check failed to correctly handle uppercase AS (such as FROM students AS T1), causing aliases to be misread as table names and the query to be rejected.

Unverified50%

24 more timeline events

All Facts (20)

Verified

Regular expressions are a pattern language specifically designed for matching, extracting, and replacing strings.

65%
Verified

Regular expressions are widely used in text processing scenarios such as web scraping development and data cleaning.

65%
Verified

Python provides regular expression support through the built-in re module

65%
Verified

The theoretical foundation of regular expressions comes from the theory of regular languages proposed by mathematician Stephen Kleene in the 1950s.

65%
Unverified

正则表达式相比AI语义理解的优势在于速度快、结果确定性高、不受上下文干扰,但对格式变化极为敏感

90%
Unverified

SQL Server 2025's T-SQL directly supports regular expression matching and replacement.

50%
Unverified

Domain-specific languages (DSLs) are programming languages designed for a specific problem domain, such as SQL for database queries, regular expressions for text matching, and Verilog for hardware description.

50%
Unverified

Text is scanned before the message is sent, and if the generated content contains a currency symbol or weight unit immediately adjacent to a number (₹, Rs, INR, rupees, g, gm, grams, tola), sending is blocked.

50%
Unverified

The regex used by the output guardrail cannot recognize numbers spelled out in words (such as twenty-two thousand), Unicode variants, or line-split fragments, nor can it distinguish legitimate numbers from quotes, so it can only serve as a last net rather than the only line of defense.

50%
Unverified

Under the m flag of JavaScript/TypeScript regex, $ matches only the end of a line rather than the end of the string, so the \n inserted by replacement correctly forces a line break after an inline label.

50%
Unverified

The TypeScript function normalizeQuickSolutionLabel given in the original article uses the regex /^([\*\_]{2}Quick solution:[\*\_]{2})\s*(.+)$/gm to match labels wrapped in bold or underscore markers at the start of a line and force insertion of a line break.

50%
Unverified

In JavaScript/TypeScript regex, ^ by default matches only the start of the string; with the m (multiline) flag added, ^ and $ match the start and end of each line.

50%
Unverified

A practical development principle is: test determinism first, then talk about prompts. If a failure reproduces stably, the problem lies in task design or tool selection rather than prompt wording, and in that case introducing regexes, parsers or structured output constraints is often more effective.

50%
Unverified

When extracting order information from WhatsApp chat logs, a single regular expression is more stable than a carefully designed prompt, especially for patterned fields such as amounts, dates and product numbers.

50%
Unverified

Regular expressions use metacharacters (such as \d matching digits and * indicating repetition) to achieve efficient text search and replacement.

50%
Unverified

For critical criteria, the code needs to re-read the original text and use regular expressions to search for unambiguous words for a second check.

50%
Unverified

Regex-matching the content between curly braces fails when it encounters nested objects or curly braces inside strings, so it is not a robust JSON extraction method.

50%
Unverified

Regex is a tripwire, not a wall; it can catch known phrasing families, but genuinely novel jailbreak phrasings may still pass through the input filter.

50%
Unverified

The fixed prompt injection regex pattern is: ignore\s+(your\s+|all\s+|the\s+)?(previous\s+)?instructions, using optional capture groups to generalize the qualifiers.

50%
Unverified

The advantage of regex filters is strong determinism, fast execution, and no need for model inference, making them suitable as the outermost first line of filtering.

50%

Source Articles