正则表达式替换器
使用正则表达式查找并替换文本。免费、隐私本地化、100% 客户端运行。
Local only
最近历史
暂无历史
使用此工具的任务
Debug regex patterns 步骤通过步骤
Debug regex 通过 testing 针对样本输入, visualizing 匹配, 和 understanding 为什么模式 matches 或 fails. Use flags 正确. 任务
提取 all URLs from a block of text
Find 每个 URL (http, https, ftp) 在 unstructured 文本和 列表它们为 validation, deduplication, 或批量过程. 任务
提取 hashtags from text
Hashtags 启动具有 # followed 通过 letters, numbers, 和 underscores. Learn 到提取, 验证, 和 normalize hashtags 从 social media 文本. 任务
提取 @mentions from text
Mentions 启动具有 @ followed 通过 username. Learn 到提取 mentions, 验证 usernames, 和 link 它们到 用户 profiles. 任务
Find 和替换文本 using regular 表达式
Search 为 patterns (不仅 字面量 strings) 在文本和 替换 matches 具有模板该 能够参考 capture groups. 任务
Optimize regex 为性能
慢 regex 能够原因 ReDoS (Regular Expression Denial 的 Service). Learn 到识别和 fix catastrophic backtracking, use atomic groups, 和 anchor patterns. 任务
Prevent SQL Injection (SQLi) attacks
SQLi injects malicious SQL 通过用户输入. Learn parameterized queries, 输入 validation, 和原则的 最少 privilege. 任务
移除 stop words from text
Stop words 是常见 words (, 是, 在, 哪个) 该添加小 meaning. Removing 它们 improves 搜索和 NLP 效率. 任务
排序 lines and remove duplicates
Take 列表的 items (one per 行), 排序它们 alphabetically 或自然, 和移除重复 lines. 任务
Stem words 到其 根 form
Stemming reduces words 到其 stem (running → 运行, better → bet). Learn Porter stemmer 和当 到 use lemmatization instead. 任务
发布前测试正则表达式
验证模式语法,检查每个匹配及其捕获组,并了解把正则变成宕机的回溯陷阱。 任务
Implement 完整-文本搜索在 SQL
完整-文本搜索 indexes words 在文本为 快 searching. Learn 到 use FULLTEXT indexes, tsvector, 和 ranking. 任务
Use regex backreferences
Backreferences \1, \2,。.. 匹配相同文本 as 前一个 capturing 组. Useful 为 matching repeated words, paired delimiters, 和 palindromes. 任务
Use regex 字符 classes 有效
字符 classes [...] 匹配任何 one 字符从 集合. Learn ranges, negation, shorthand classes, 和 escaping rules. 任务
Use regex capturing 和 non-capturing groups
Groups (...) capture submatches 为 backreferences 和 extraction. Non-capturing (?:...) 组无 capturing. Named groups (?<name>...) improve readability. 任务
Use regex lookahead assertions
Lookahead (?=...) 和 (?!...) assert 什么 follows (或 doesn't follow) 当前位置无 consuming characters. Zero-宽度 assertions. 任务
Use regex lookbehind assertions
Lookbehind (?<=...) 和 (?<!...) assert 什么 precedes 当前位置. Supported 在现代 engines (ES2018+, Java,。NET, PCRE). 任务
Use regex quantifiers: *, +, ?, {n,m}
Quantifiers 指定如何许多 times 模式 repeats. Learn greedy, lazy, 和 possessive matching 到 avoid catastrophic backtracking. 任务
Write robust email validation regex
Email validation regex 是 notoriously 复杂由于 RFC 5322. Learn practical patterns 为常见用例和 其 limitations. 任务
Write phone 数字 validation regex
Phone numbers 变化 wildly 通过 country. Learn practical regex patterns 为常见 formats 和为什么 phone 库是 经常 better. 任务
使用此工具的管道
相关工具
正则表达式测试器
测试正则表达式,支持匹配高亮、捕获组和替换预览。免费、隐私本地化、100% 客户端运行。支持全局(g)、忽略大小写(i)、多行(m)、dotAll(s)标志位,匹配在带超时的 Web Worker 中运行以避免灾难性回溯冻结页面。 工具
Base64 图片预览器
预览 Base64 编码的图片并显示元数据。免费、隐私本地化、100% 客户端运行。 工具
大小写转换器
在 UPPER、lower、Title、camelCase、PascalCase、snake_case、kebab-case、CONSTANT_CASE 和 Sentence case 等格式之间转换文本。免费、隐私本地化、100% 客户端运行。自动识别混合输入(如 hello_worldFoo),按空格/下划线/连字符/大写边界拆分,适合变量命名、API 字段、CSS 类名和常量定义的格式转换。 工具