> For the complete documentation index, see [llms.txt](https://docs.panther.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.panther.com/ko/pantherflow/functions/regular-expression.md).

# 정규 표현식 함수

{% hint style="info" %}
PantherFlow는 Panther 버전 1.110부터 공개 베타로 제공되며, 모든 고객이 사용할 수 있습니다. 버그 보고와 기능 요청은 Panther 지원팀에 공유해 주세요.
{% endhint %}

## `re.count()`

`re.count(stringable: any, regex: string) -> int`

다음이 나타나는 횟수를 반환합니다 `정규식` 다음에 나타납니다 `문자열로 변환 가능한 값`, 또는 `null` 어떤 값이라도 `null`.

**예:**

```kusto
panther_logs.public.aws_alb
| project tripleDigitBlocks=re.count(clientIp, "[0-9][0-9][0-9]")
```

## `re.matches()`

`re.matches(stringable: any, regex: string) -> bool`

다음과 일치하면 true를 반환합니다 `문자열로 변환 가능한 값` 정규식과 일치합니다 `정규식`.

**예:**

```kusto
panther_logs.public.aws_alb
| project inCidr=re.matches(clientIp, '^192\\.168\\.1\\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})$'), clientIp
```

## `re.replace()`

`re.replace(stringable: any, regex: string, replacement: string) -> string`

반환합니다 `문자열로 변환 가능한 값` 지정된 패턴이 있는 `정규식` (또는 패턴의 모든 발생)을 제거하거나 다음으로 대체됩니다 `치환 문자열`, 또는 `null` 어떤 값이라도 `null`.

**예:**

```kusto
panther_logs.public.aws_alb
| project traceId=re.replace(connTraceId, "^(TID_)", "")
```

## `re.substr()`

`re.substr(stringable: any, regex: string) -> string`

다음과 일치하는 첫 번째 하위 문자열을 반환합니다 `정규식` 내 `문자열로 변환 가능한 값`, 또는 `null` 어떤 값이라도 `null`.

**예:**

```kusto
panther_logs.public.aws_alb
| project tripleDigitBlocks=re.substr(clientIp, "[0-9][0-9][0-9]")
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.panther.com/ko/pantherflow/functions/regular-expression.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
