插件
Advanced Regex
使用 Python 正则语法对字符串执行高级正则表达式操作,例如提取、替换和切分字符串
概述
帮助
具体内容
下载
chariot plugin download chariot/c_advanced_regex:1.0.6
描述
使用 Python 正则语法对字符串执行高级正则表达式操作,例如提取、替换和切分字符串
动作
- 通过正则表达式从字符串中提取数据
- 正则表达式搜索和替换字符串
- 使用正则表达式将字符串分割成数组
Advanced Regex
关于
使用 Python 正则语法对字符串执行高级正则表达式操作,例如提取、替换和切分字符串动作
数据提取
通过正则表达式从字符串中提取数据.
输入
Name | Type | Default | Required | Description | Enum |
---|---|---|---|---|---|
in_string | string | None | True | 输入字符串 | None |
in_regex | string | None | True | 用于数据提取的正则表达式 | None |
ignorecase | boolean | None | False | 使正则表达式不区分大小写 | None |
multiline | boolean | None | False | 使开始/结束考虑每一行 | None |
dotall | boolean | None | False | 使点号匹配新行 | None |
ascii | boolean | None | False | 使 \w \W \b \B 遵循ASCII规则 | None |
输出
Name | Type | Required | Description |
---|---|---|---|
match | object | True | 与 Python re.findall() 输出匹配的第一行字符串数组 |
matches | object | True | 与 Python re.findall() 输出匹配的多行字符串数组 |
搜索和替换
正则表达式搜索和替换字符串.
输入
Name | Type | Default | Required | Description | Enum |
---|---|---|---|---|---|
in_string | string | None | True | 输入字符串 | None |
replace_string | string | None | False | 要替换匹配项的字符串 | None |
in_regex | string | None | True | 要匹配的正则表达式 | None |
max_replace | integer | 0 | False | 要替换的最大出现次数-如果为零,则全部替换 | None |
ignorecase | boolean | None | False | 使正则表达式不区分大小写 | None |
multiline | boolean | None | False | 使开始/结束考虑每一行 | None |
dotall | boolean | None | False | 使点号匹配新行 | None |
ascii | boolean | None | False | 使\w\w\b\b遵循ASCII规则 | None |
输出
Name | Type | Required | Description |
---|---|---|---|
result | string | True | 替换操作的结果 |
正则切分
使用正则表达式将字符串分割成数组.
输入
Name | Type | Default | Required | Description | Enum |
---|---|---|---|---|---|
in_string | string | None | True | 输入字符串 | None |
in_regex | string | None | True | 正则表达式在匹配项上拆分字符串 | None |
max_split | integer | 0 | False | 最大分割 - 如果最后一个非零元素是字符串的余数 | None |
ignorecase | boolean | None | False | 使正则表达式不区分大小写 | None |
multiline | boolean | None | False | 使开始/结束考虑每一行 | None |
dotall | boolean | None | False | 使点号匹配新行 | None |
ascii | boolean | None | False | Make \w \W \b \B follow ASCII rules | None |
输出
Name | Type | Required | Description |
---|---|---|---|
result | []string | True | 拆分操作返回的字符串数组 |
触发器
该插件不包含任何触发器。
连接
该插件不包含任何连接。
故障排除
该插件不包含任何故障排除信息。
版本
- 1.0.6 -
- 1.0.5 -
- 1.0.4 -
- 1.0.3 -
索引
该插件不包含任何索引。
plugin_spec_version: v2
extension: plugin
products: []
name: c_advanced_regex
title: 高级正则表达式
description: 使用 Python 正则语法对字符串执行高级正则表达式操作,例如提取、替换和切分字符串
version: 1.0.6
support: community
vendor: chariot
status: []
tags:
- data manipulation
- utility
hub_tags:
use_cases:
- data_utility
keywords:
- data manipulation
- utility
features: []
enable_cache: true
language: python
actions:
data_extraction:
title: 数据提取
description: 通过正则表达式从字符串中提取数据
input:
in_string:
title:
en: Input String
zh-CN: 输入字符串
description:
en: Input string
zh-CN: 输入字符串
type: string
required: true
example: "Lorem ipsum dolor sit amet, consectetur \nadipiscing elit. Aliquam sapien ex, lorems odales"
in_regex:
title:
en: Regex
zh-CN: 正则表达式
description:
en: Regex to use for data extraction
zh-CN: 用于数据提取的正则表达式
type: string
required: true
example: lorem
ignorecase:
title:
en: Ignore Case
zh-CN: 忽略大小写
description:
en: Make regex non-case sensitive
zh-CN: 使正则表达式不区分大小写
type: boolean
required: false
default: false
example: true
multiline:
title:
en: Multiline
zh-CN: 多行
description:
en: Make begin/end consider each line
zh-CN: 使开始/结束考虑每一行
type: boolean
required: false
default: false
example: true
dotall:
title:
en: Dot All
zh-CN: 使点号匹配新行
description:
en: Make . match newline
zh-CN: 使点号匹配新行
type: boolean
required: false
default: false
example: true
ascii:
title:
en: ASCII
zh-CN: ASCII
description:
en: Make \w \W \b \B follow ASCII rules
zh-CN: 使 \w \W \b \B 遵循ASCII规则
type: boolean
required: false
default: false
example: false
output:
match:
title:
en: Match single line
zh-CN: 匹配第一行
description:
en: Multiple single line re.findall()
zh-CN: 与 Python re.findall() 输出匹配的第一行字符串数组
type: object
required: true
matches:
title:
en: Matches
zh-CN: 匹配多行
description:
en: Multiple lines re.findall()
zh-CN: 与 Python re.findall() 输出匹配的多行字符串数组
type: object
required: true
replace:
title: 搜索和替换
description: 正则表达式搜索和替换字符串
input:
in_string:
title:
en: Input String
zh-CN: 输入字符串
description:
en: Input string
zh-CN: 输入字符串
type: string
required: true
example: "Lorem ipsum dolor sit amet, consectetur \nadipiscing elit. Aliquam sapien ex, lorems odales"
replace_string:
title:
en: New String
zh-CN: 新的字符串
description:
en: The string to replace matches with
zh-CN: 要替换匹配项的字符串
type: string
required: false
example: REPLACED
in_regex:
title:
en: Regex
zh-CN: 正则表达式
description:
en: Regex to match
zh-CN: 要匹配的正则表达式
type: string
required: true
example: lorem
max_replace:
title:
en: Max Replace
zh-CN: 最大替换次数
description:
en: Max occurrences to replace - if zero all will be replaced
zh-CN: 要替换的最大出现次数-如果为零,则全部替换
type: integer
required: false
default: 0
example: 0
ignorecase:
title:
en: Ignore Case
zh-CN: 忽略大小写
description:
en: Make regex non-case sensitive
zh-CN: 使正则表达式不区分大小写
type: boolean
required: false
default: false
example: true
multiline:
title:
en: Multiline
zh-CN: 多行
description:
en: Make begin/end consider each line
zh-CN: 使开始/结束考虑每一行
type: boolean
required: false
default: false
example: true
dotall:
title:
en: Dot All
zh-CN: 使点号匹配新行
description:
en: Make . match newline
zh-CN: 使点号匹配新行
type: boolean
required: false
default: false
example: true
ascii:
title:
en: ASCII
zh-CN: ASCII
description:
en: Make \w \W \b \B follow ASCII rules
zh-CN: 使\w\w\b\b遵循ASCII规则
type: boolean
required: false
default: false
example: false
output:
result:
title:
en: Result String
zh-CN: 结果字符串
description:
en: The result of the replace operation
zh-CN: 替换操作的结果
type: string
required: true
split:
title: 正则切分
description: 使用正则表达式将字符串分割成数组
input:
in_string:
title:
en: Input String
zh-CN: 输入字符串
description:
en: Input string
zh-CN: 输入字符串
type: string
required: true
example: "Lorem ipsum dolor sit amet, consectetur \nadipiscing elit. Aliquam sapien ex, lorems odales sed"
in_regex:
title:
en: Regex
zh-CN: 正则表达式
description:
en: Regex to split string on matches
zh-CN: 正则表达式在匹配项上拆分字符串
type: string
required: true
example: lorem
max_split:
title:
en: Max Split
zh-CN: 最大分割
description:
en: Max splits - if non-zero last element is remainder of string
zh-CN: 最大分割 - 如果最后一个非零元素是字符串的余数
type: integer
required: false
default: 0
example: 0
ignorecase:
title:
en: Ignore Case
zh-CN: 忽略大小写
description:
en: Make regex non-case sensitive
zh-CN: 使正则表达式不区分大小写
type: boolean
required: false
default: false
example: true
multiline:
title:
en: Multiline
zh-CN: 多行
description:
en: Make begin/end consider each line
zh-CN: 使开始/结束考虑每一行
type: boolean
required: false
default: false
example: true
dotall:
title:
en: Dot All
zh-CN: 使点号匹配新行
description:
en: Make . match newline
zh-CN: 使点号匹配新行
type: boolean
required: false
default: false
example: true
ascii:
title:
en: ASCII
zh-CN: ASCII
description:
en: Make \w \W \b \B follow ASCII rules
zh-CN: Make \w \W \b \B follow ASCII rules
type: boolean
required: false
default: false
example: false
output:
result:
title:
en: Result Strings
zh-CN: 结果字符串
description:
en: An array of the strings returned by the split operation
zh-CN: 拆分操作返回的字符串数组
type: "[]string"
required: true
type: 网络查询工具