Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
Regex.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "CoreTypes.h"
5#include "Containers/UnrealString.h"
6#include "Templates/SharedPointer.h"
7
8class FRegexPatternImplementation;
9class FRegexMatcherImplementation;
10
12{
13 None = 0,
14 CaseInsensitive = (1 << 0),
15};
17
18/**
19 * Implements a regular expression pattern.
20 * @note DO NOT use this class as a file-level variable as its construction relies on the internationalization system being initialized!
21 */
23{
24 friend class FRegexMatcher;
25
26public:
27 explicit FRegexPattern(const FString& SourceString, ERegexPatternFlags Flags = ERegexPatternFlags::None);
28
29 FRegexPattern(const FRegexPattern&) = default;
31
34
35private:
37};
38
39/**
40 * Implements a regular expression pattern matcher.
41 * @note DO NOT use this class as a file-level variable as its construction relies on the internationalization system being initialized!
42 */
44{
45public:
46 FRegexMatcher(const FRegexPattern& SourcePattern, const FString& Input);
47 FRegexMatcher(FRegexPattern&& SourcePattern, const FString& Input);
48
49 FRegexMatcher(const FRegexMatcher&) = delete;
51
54
55 bool FindNext();
56
59
60 int32 GetCaptureGroupBeginning(const int32 Index);
61 int32 GetCaptureGroupEnding(const int32 Index);
62 FString GetCaptureGroup(const int32 Index);
63
65 int32 GetEndLimit();
66 void SetLimits(const int32 BeginIndex, const int32 EndIndex);
67
68private:
71};
#define ENUM_CLASS_FLAGS(Enum)
ERegexPatternFlags
Definition Enums.h:13341
int32 GetCaptureGroupBeginning(const int32 Index)
FString GetCaptureGroup(const int32 Index)
int32 GetCaptureGroupEnding(const int32 Index)
int32 GetEndLimit()
FRegexMatcher(const FRegexPattern &SourcePattern, const FString &Input)
FRegexMatcher(const FRegexMatcher &)=delete
FRegexMatcher & operator=(FRegexMatcher &&)=default
int32 GetMatchEnding()
FRegexMatcher(FRegexMatcher &&)=default
void SetLimits(const int32 BeginIndex, const int32 EndIndex)
int32 GetBeginLimit()
FRegexMatcher(FRegexPattern &&SourcePattern, const FString &Input)
TSharedRef< FRegexMatcherImplementation > Implementation
Definition Regex.h:70
FRegexPattern Pattern
Definition Regex.h:69
FRegexMatcher & operator=(const FRegexMatcher &)=delete
int32 GetMatchBeginning()
FRegexPattern(const FRegexPattern &)=default
FRegexPattern(const FString &SourceString, ERegexPatternFlags Flags=ERegexPatternFlags::None)
FRegexPattern(FRegexPattern &&)=default
FRegexPattern & operator=(const FRegexPattern &)=default
FRegexPattern & operator=(FRegexPattern &&)=default
TSharedRef< FRegexPatternImplementation > Implementation
Definition Regex.h:36