0

How do you call...

....things like \n \d \W ? And is there a List, where i can find them all including explenation? Trank you all for your help

22nd Aug 2020, 12:04 PM
Balthasar-Max. Althaus
Balthasar-Max. Althaus - avatar
5 Answers
- 1
I found \d and \W. They are called metacharacters and are used, if you want your program to match something. As I mentioned before, I found them in a code searching for characters in a password. Now it is clear to my, what exactly it does. Want to see, if the password matches any digit (0-9) than use \d Want to see, if the password matches any NON alphanumeric character, than use \W
22nd Aug 2020, 2:17 PM
Balthasar-Max. Althaus
Balthasar-Max. Althaus - avatar
+ 2
This covers most of it used in Java. https://www.geeksforgeeks.org/escape-sequences-in-java/
22nd Aug 2020, 12:22 PM
Avinesh
Avinesh - avatar
22nd Aug 2020, 1:01 PM
David
David - avatar
0
thank you all a lot. now i learned, they are called „escape sequences“ and i got two lists. Maybe i will find some more. there must be also \d and \W. \d for charakters like &€@! \W for whitespaces. i found both in a code, that checked, if there were numbers, charakters such as shown above and spaces in a password. so i guess, they must be also kind of escape sequences
22nd Aug 2020, 1:34 PM
Balthasar-Max. Althaus
Balthasar-Max. Althaus - avatar
0
why are they called metacharactets? see the link from Ashish Kumar and scrol down. i might be wrong, but it is interesting
22nd Aug 2020, 4:42 PM
Balthasar-Max. Althaus
Balthasar-Max. Althaus - avatar