Click here to Skip to main content
15,885,799 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: viva computer scientists for knocking one out the quantum ballpark Pin
lopatir6-Mar-20 8:52
lopatir6-Mar-20 8:52 
GeneralRe: viva computer scientists for knocking one out the quantum ballpark Pin
Nelek6-Mar-20 9:17
protectorNelek6-Mar-20 9:17 
GeneralRe: viva computer scientists for knocking one out the quantum ballpark Pin
Greg Utas6-Mar-20 12:27
professionalGreg Utas6-Mar-20 12:27 
GeneralRe: viva computer scientists for knocking one out the quantum ballpark Pin
kalberts6-Mar-20 13:30
kalberts6-Mar-20 13:30 
GeneralRe: viva computer scientists for knocking one out the quantum ballpark Pin
Mark_Wallace6-Mar-20 14:34
Mark_Wallace6-Mar-20 14:34 
GeneralRe: viva computer scientists for knocking one out the quantum ballpark Pin
Nelek6-Mar-20 23:27
protectorNelek6-Mar-20 23:27 
GeneralRe: viva computer scientists for knocking one out the quantum ballpark Pin
Mike Hankey6-Mar-20 18:33
mveMike Hankey6-Mar-20 18:33 
RantJava is giving me a splitting headache over a caret Pin
ZurdoDev6-Mar-20 7:52
professionalZurdoDev6-Mar-20 7:52 
Java's split() behaves very weirdly. I was needing to split on a caret ^ and
Java
"Test1^Test2".split("^")
was throwing an error. A quick google search says that special characters need to be escaped. No big deal, I do
"Test1^Test2".split("\\^")
and still same error (invalid escape sequence characters...)

I google for a java fiddle and test it in the fiddle and it works great. So, I check eclipse and find that I have java 1.8 so I include that in google.

Luckily I find a new response that says to use java.util.regex.Pattern.quote(). So, I try
Java
"Test1^Test2".split(java.util.regex.Pattern.quote("^"));
and that actually works.

The documentation says string.split() has been around since Java 1.4 so why in the world would eclipse behave different than other java compilers?
Social Media - A platform that makes it easier for the crazies to find each other.

Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.

GeneralRe: Java is giving me a splitting headache over a caret Pin
Greg Utas6-Mar-20 7:57
professionalGreg Utas6-Mar-20 7:57 
GeneralRe: Java is giving me a splitting headache over a caret Pin
Marc Clifton6-Mar-20 8:19
mvaMarc Clifton6-Mar-20 8:19 
GeneralRe: Java is giving me a splitting headache over a caret Pin
Mark_Wallace6-Mar-20 9:58
Mark_Wallace6-Mar-20 9:58 
GeneralRe: Java is giving me a splitting headache over a caret Pin
Richard Deeming6-Mar-20 8:38
mveRichard Deeming6-Mar-20 8:38 
GeneralRe: Java is giving me a splitting headache over a caret Pin
ZurdoDev6-Mar-20 8:58
professionalZurdoDev6-Mar-20 8:58 
GeneralRe: Java is giving me a splitting headache over a caret Pin
dandy726-Mar-20 8:44
dandy726-Mar-20 8:44 
GeneralRe: Java is giving me a splitting headache over a caret Pin
Mark_Wallace6-Mar-20 14:56
Mark_Wallace6-Mar-20 14:56 
GeneralRe: Java is giving me a splitting headache over a caret Pin
Richard MacCutchan6-Mar-20 21:50
mveRichard MacCutchan6-Mar-20 21:50 
GeneralRe: Java is giving me a splitting headache over a caret Pin
Vikram A Punathambekar6-Mar-20 23:38
Vikram A Punathambekar6-Mar-20 23:38 
GeneralRe: Java is giving me a splitting headache over a caret Pin
ZurdoDev7-Mar-20 4:54
professionalZurdoDev7-Mar-20 4:54 
GeneralSubnet question Pin
pkfox6-Mar-20 7:41
professionalpkfox6-Mar-20 7:41 
GeneralRe: Subnet question Pin
W Balboos, GHB6-Mar-20 7:47
W Balboos, GHB6-Mar-20 7:47 
GeneralRe: Subnet question Pin
  Forogar  6-Mar-20 7:51
professional  Forogar  6-Mar-20 7:51 
GeneralRe: Subnet question Pin
lopatir6-Mar-20 8:42
lopatir6-Mar-20 8:42 
GeneralRe: Subnet question Pin
Nelek6-Mar-20 8:03
protectorNelek6-Mar-20 8:03 
GeneralRe: Subnet question Pin
phil.o6-Mar-20 8:21
professionalphil.o6-Mar-20 8:21 
GeneralRe: Subnet question Pin
dandy726-Mar-20 8:27
dandy726-Mar-20 8:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.