Posted 06 September 2017 - 02:40 PM
So I'm basically doing something with Love2D and when looking at a networking example the server script I saw that it basically searches for 2 coordinates in a message that the clients send.
The message looks like this:
"320 240"
And the server then tries to get the coordinates with this pattern:
"^(%-?[%d.e]*) (%-?[%d.e]*)$"
Sooo I get the the first bracket searches at the beginning and the second at the end and "%-?" means that it optionally searches for "-" (so "-320 -240" would work too)…. The only thing I don't get is [%d.e]
Well I know that %d means a digit but I don't get the ".e" part.
What does it mean?
The message looks like this:
"320 240"
And the server then tries to get the coordinates with this pattern:
"^(%-?[%d.e]*) (%-?[%d.e]*)$"
Sooo I get the the first bracket searches at the beginning and the second at the end and "%-?" means that it optionally searches for "-" (so "-320 -240" would work too)…. The only thing I don't get is [%d.e]
Well I know that %d means a digit but I don't get the ".e" part.
What does it mean?