Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Mar 2012
    Posts
    33
    Thanks
    1
    Thanked 1 Time in 1 Post

    What does this delimiter do

    I have this line in my java code. Can you explain the regular expression and what it does?

    Code:
    scanner.useDelimiter("[ ]*(,)[ ]*");
    Thanks in advance

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,978
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    It simply changes the token on which is used to skip input for use with next* calls (assuming that this is on the java.util.Scanner object). So this would tokenize on the ' , ' instead of just the default whitespace.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •