Enthuware
http://enthuware.com/forum/

About Question enthuware.ocpjp.v7.2.1426 :
http://enthuware.com/forum/viewtopic.php?f=38&t=1609
Page 1 of 1

Author:  ETS User [ Wed Feb 20, 2013 4:51 pm ]
Post subject:  About Question enthuware.ocpjp.v7.2.1426 :

Do we need to escape "\\d\\d"?

Author:  admin [ Wed Feb 20, 2013 5:39 pm ]
Post subject:  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".

Author:  ArnobDe [ Fri Mar 13, 2015 2:31 am ]
Post subject:  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 :?:

Author:  admin [ Fri Mar 13, 2015 5:37 am ]
Post subject:  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.

Author:  jagoneye [ Fri Jan 06, 2017 5:12 am ]
Post subject:  Re: About Question enthuware.ocpjp.v7.2.1426 :

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".

What? It runs fine with a single '\' in this statement for example:
Code:
System.out.println("\t yosha");

Output:
Code:
    yosha

you can use single '\' for special characters like
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. :)

Author:  admin [ Fri Jan 06, 2017 8:51 am ]
Post subject:  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!

Author:  jagoneye [ Fri Jan 06, 2017 8:56 am ]
Post subject:  Re: About Question enthuware.ocpjp.v7.2.1426 :

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!

You are welcome. :)

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/