About Question enthuware.ocpjp.v7.2.1426 :
Moderators: Site Manager, fjwalraven
-
- Site Admin
- Posts: 10065
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1426 :
No, the additional '\' is required only when you are using a special character within a string in the code. For example, "\\t is for tab". If you don't put \\ here, you will get " is for tab".
If you like our products and services, please help us by posting your review here.
-
- Posts: 8
- Joined: Tue Jan 27, 2015 3:33 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1426 :
0 12 followed by 3d dc 2a b2 3 [matching 2 characters at a time] then please explain 9 23
-
- Site Admin
- Posts: 10065
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1426 :
Not sure what is your question. The pattern matches 2 consecutive digits not just any two characters.
If you like our products and services, please help us by posting your review here.
-
- Posts: 97
- Joined: Wed Dec 28, 2016 9:00 am
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1426 :
What? It runs fine with a single '\' in this statement for example:admin wrote:No, the additional '\' is required only when you are using a special character within a string in the code. For example, "\\t is for tab". If you don't put \\ here, you will get " is for tab".
Code: Select all
System.out.println("\t yosha");
Code: Select all
yosha
b t n r " ' \.
Only for regex you need to escape the '\' because '\s' is required for example but in
Java String you need to escape '\' with '\' hence the String will be '\\s'.
Hope I'm not wrong.
-
- Site Admin
- Posts: 10065
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1426 :
You are right \\ is only required in a string for regex patterns because you want to let \ be a part of the regex.
thank you for your feedback!
thank you for your feedback!
If you like our products and services, please help us by posting your review here.
-
- Posts: 97
- Joined: Wed Dec 28, 2016 9:00 am
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1426 :
You are welcome.admin wrote:You are right \\ is only required in a string for regex patterns because you want to let \ be a part of the regex.
thank you for your feedback!
Who is online
Users browsing this forum: No registered users and 67 guests