Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
General
»
[TGUI] EditBox validator (regex)
Print
Pages: [
1
]
Author
Topic: [TGUI] EditBox validator (regex) (Read 2267 times)
0 Members and 1 Guest are viewing this topic.
marcolo2307
Newbie
Posts: 3
[TGUI] EditBox validator (regex)
«
on:
July 03, 2017, 01:23:39 am »
Hi!
I want to get IP from EditBox, but regex don't work correctly. My example regex:
Code:
[Select]
"(([0-9]?){3}\\.){3}([0-9]?){3}"
Works on std::regex and online tester, doesn't work on EditBox ;/
Logged
Laurent
Administrator
Hero Member
Posts: 32498
Re: [TGUI] EditBox validator (regex)
«
Reply #1 on:
July 03, 2017, 07:56:40 am »
As far as I know, TGUI has its own forum.
Logged
Laurent Gomila - SFML developer
texus
Hero Member
Posts: 505
Re: [TGUI] EditBox validator (regex)
«
Reply #2 on:
July 03, 2017, 11:08:32 am »
Yeah, for further questions about TGUI it's probably better to ask them on
forum.tgui.eu
.
The regex for edit box has a rather limited functionality. If you can match the string with std::regex then pasting it in edit box while the regex is set should also work. But because the regex has to be valid at any time, you can't type in the edit box because any incomplete ip address will be rejected. It would be better to allow the user to type any combination of numbers and dots and processing the value yourself later.
Logged
TGUI
: C++ SFML GUI
Print
Pages: [
1
]
SFML community forums
»
Help
»
General
»
[TGUI] EditBox validator (regex)