{"pattern":"(\\w+)@(\\w+)\\.com","flags":"g","matched":true,"count":2,"matches":[{"match":"[email protected]","index":0,"groups":["ana","acme"],"named":null},{"match":"[email protected]","index":14,"groups":["bob","corp"],"named":null}]}
curl --location --request GET 'https://zylalabs.com/api/13159/regular+expression+tester+api/26705/test+regular+expression' --header 'Authorization: Bearer YOUR_API_KEY'
注册后,每个开发者都会被分配一个个人 API 访问密钥,这是一个唯一的字母和数字组合,用于访问我们的 API 端点。要使用 Regular Expression Tester API 进行身份验证,只需在 Authorization 标头中包含您的 bearer token。
| 标头 | 描述 |
|---|---|
授权
|
必需
应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。
|
无长期承诺。随时升级、降级或取消。 免费试用包括最多 50 个请求。
(年度计费可节省 2 个月 🎉)
领先企业的信赖之选
Run regular expressions safely, even ones you do not trust. Every pattern is evaluated in an isolated worker with a hard time limit, so catastrophic backtracking is stopped cleanly instead of hanging your servers.
Useful for regular expression playgrounds and teaching tools, validating user supplied patterns before saving them, extracting fields from logs and documents, and debugging patterns in delivery pipelines.
The Test Regular Expression endpoint returns data indicating whether the regex matched the input text, the total match count, and detailed match information including matched text, positions, capture groups, and named groups.
Key fields in the response include "pattern" (the regex used), "flags" (regex flags), "matched" (boolean indicating a match), "count" (number of matches), and "matches" (an array of match details including "match", "index", "groups", and "named").
The response data is structured as a JSON object. It contains the regex pattern and flags, a boolean for match status, a count of matches, and an array of match objects, each detailing the matched text, its position, and any capture or named groups.
The endpoint provides information on whether the regex matched the input, the number of matches found, and detailed match data including the matched text, its position in the input, and any capture or named groups.
用户可以通过在GET请求的查询参数中指定正则表达式模式、输入文本和可选标志(如用于全局匹配的'g')来自定义他们的请求
典型的用例包括验证用户提供的正则表达式模式 从日志或文档中提取特定字段 调试正则表达式模式 和为教育目的创建互动正则表达式游乐场
Users can utilize the returned data by analyzing the "matches" array to extract relevant information, such as using capture groups for further processing or displaying matched results in user interfaces.
Standard data patterns include simple matches like email addresses or phone numbers, as well as more complex patterns involving multiple capture groups. Users should expect variations in match counts based on the input text and regex complexity.