Quick question that my last program made me want to ask. I found another solution that didn't require me to do this for the program, but it got me curious: How do you represent a return key in a regular expression?
Let's say you want to hold execution pending a return key press (which is what I was doing). One way to do that would be to rig a scanner on System.in using a delimiter pattern that says to accept only return characters. So for instance:
Pattern p = Pattern.compile("//Regular expression goes here.");
What character would one use in that regular expression for representing the return key?
Thanks as always,