# 정규식 함수

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

## `re.count()`

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

다음이 발생한 횟수를 반환합니다 `regex` 에 나타나는 `stringable`, 또는 `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를 반환합니다 `stringable` 정규식과 일치하는 `regex`.

**예시:**

```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`

다음을 반환합니다 `stringable` 지정된 패턴이 있는 `regex` (또는 패턴의 모든 발생을) 제거하거나 다음으로 대체한 `replacement`, 또는 `null` 다음 값 중 하나라도 `null`.

**예시:**

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

## `re.substr()`

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

다음과 일치하는 첫 번째 하위 문자열을 반환합니다 `regex` 내에서 `stringable`, 또는 `null` 다음 값 중 하나라도 `null`.

**예시:**

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


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
