ANTICHAT

ANTICHAT (https://forum.antichat.xyz/index.php)
-   Общие вопросы программирования (https://forum.antichat.xyz/forumdisplay.php?f=206)
-   -   Регулярные выражения (https://forum.antichat.xyz/showthread.php?t=1438812)

Savchik Blazer 01.07.2022 12:39

Написал вот такой код, но он не работает

C++:





Код:

std
::
string comm
=
commandtext
;
std
::
smatch chatres
;
if
(
std
::
regex_match
(
comm
,
chatres
,
std
::
regex
(
"/id%d"
)
)
)
{
SF
->
getSAMP
(
)
->
getChat
(
)
->
AddChatMessage
(
-
1
,
"%d"
,
chatres
[
1
]
.
str
(
)
.
c_str
(
)
)
;
}



Commandtext - это текст хукнутой команды

F0RQU1N and 01.07.2022 15:56

Посмотри, как они работают - https://en.cppreference.com/w/cpp/regex, а ваще я ссканф юзаю


Время: 00:00