Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6845577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:31:04+00:00 2026-05-27T00:31:04+00:00

How can I read an email address as a token? I saw that the

  • 0

How can I read an email address as a token?

I saw that the tokenizer method has a limit of 16 bits of length, well my token is like this:

command emailtest@somewhere.com 50

I want to be able to store the email (can be any email address) and the number (can vary from 5-1500). I dont care about the command token.

My code looks like this:

String test2 = command.substring(7);
StringTokenizer st = new StringTokenizer(test2);
String email = st.nextToken();
String amount = st.nextToken();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:31:05+00:00Added an answer on May 27, 2026 at 12:31 am

    So if you have your data in a variable called command you could simply do:

    StringTokenizer st = new StringTokenizer(command);
    st.nextToken(); //discard the "command" token since you don't care about it
    String email = st.nextToken();
    String amount = st.nextToken();
    

    Alternatively, you can use “split” on the string to load it into an array:

    String[] tokens = command.split("\w"); //this splits on any whitespace, not just the space
    String email = tokens[1];
    String amount = tokens[2];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In iOS, how can I read the owners email adresses that are stored in
I can read settings like this, for example: final String mytest = System.getString(this.getContentResolver(), System.AIRPLANE_MODE_ON);
I have seen some examples of php scripts that read email headers and parse
I am looking for a tool that will convert any email address into an
I've just read about MVC3's new CompareAttribute that you can apply to a model's
I would like to save data in cookies (user name, email address, etc...) but
I would like to have a aspect of my site that users can use
I can read the current delivery count using javax.jms.Message.getIntProperty(JMSXDeliveryCount). I'm trying to read the
Anyone can read the GoF book to learn what design patterns are and how
I can read the MySQL documentation and it's pretty clear. But, how does one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.