Results 1 to 8 of 8
Like Tree2Likes
  • 2 Post By kjkrum

Thread: Regex Help Please

  1. #1
    africanhacker is offline Senior Member
    Join Date
    Feb 2011
    Posts
    107
    Rep Power
    0

    Default Regex Help Please

    Hie guys I am in desperate need of help. I am supposed to hand in my assignment in 2hrs and things are not looking up. I am just taping anything and everything to make my code work although I am breaking everything I know about best practice.


    I need code that can remove all the characters characters before and everything else after and just give me the numbers.

    Sugar Cane 760
    Sea Salt 85
    Porridge 170
    Peanut Butter 95

    My plan is to just add all these up and have a total. Please help.

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,932
    Rep Power
    8

    Default

    Word to the wise: mentioning your deadline just makes you look impatient and as if you think your time is more important than the time of others around here, which comes off as extremely rude.

    Also, don't just type "anything and everything to make my code work". Work carefully.

    What have you tried? Where are you stuck? If you want help, you'll have to provide an SSCCE, not just dump your homework on us.

    Read this: Pattern (Java Platform SE 6) and also the link in my signature on asking smart questions.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    africanhacker is offline Senior Member
    Join Date
    Feb 2011
    Posts
    107
    Rep Power
    0

    Default

    Cheers Kevin, you really put me in my place didn't you.

    Here's a word of advice: At times people really are desperate and just need a hand NOT some smarty pants comment from a jerk who clearly has had too much to eat.

    Problem solved by the way :)

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,436
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by africanhacker View Post
    Here's a word of advice: At times people really are desperate and just need a hand NOT some smarty pants comment from a jerk who clearly has had too much to eat.
    That doesn't make your OP more intelligent; telling that we should hurry and you're desparate and what have you, certainly makes me frown on your post.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,932
    Rep Power
    8

    Default

    Quote Originally Posted by africanhacker View Post
    Cheers Kevin, you really put me in my place didn't you.

    Here's a word of advice: At times people really are desperate and just need a hand NOT some smarty pants comment from a jerk who clearly has had too much to eat.
    How did I put you in your place? How were my comments "smarty pants"? How am I being a jerk? And how have I had too much to eat?

    I was just trying to tell you that people tend to react negatively to posts like "omg help me I have an hour to do this plzz plzzzz typring randomly doesn't help, give me the codes".

    I then gave you a link to a tutorial on regular expressions. How was any of that negative?

    Whatever. IgnoreList++
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  6. #6
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default

    Quote Originally Posted by africanhacker View Post
    Here's a word of advice: At times people really are desperate and just need a hand NOT some smarty pants comment from a jerk who clearly has had too much to eat.
    What he said was true, and I thought he explained it very politely.

    Nobody on these forums gets paid to help you. Some of us are professional programmers spending our free time to help newbies. If you graduate and go pro, you're either going to be a good programmer, or someone who is will have to pick up your slack. So it's to our advantage to teach you how to think things through yourself. We're not going to do your homework for you. If you wait until two hours before an assignment is due to ask for help, and you don't have time to put forth an honest effort and ask intelligent questions, then frankly, you don't deserve to pass.
    KevinWorkman and Fubarable like this.
    Get in the habit of using standard Java naming conventions!

  7. #7
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,784
    Rep Power
    7

    Default

    Quote Originally Posted by africanhacker View Post
    Cheers Kevin, you really put me in my place didn't you.

    Here's a word of advice: At times people really are desperate and just need a hand NOT some smarty pants comment from a jerk who clearly has had too much to eat.

    Problem solved by the way :)
    Guess what "smarty pants"? I too will not bother helping a rude ignorant ungrateful buttwipe such as yourself again!

  8. #8
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by africanhacker View Post
    Cheers Kevin, you really put me in my place didn't you.

    Here's a word of advice: At times people really are desperate and just need a hand NOT some smarty pants comment from a jerk who clearly has had too much to eat.

    Problem solved by the way :)
    Your problem may have been solved, but you've also antagonized half the folks here with your comments. I'd call that short-term problem solved, long-term problems created.

Similar Threads

  1. RegEx
    By watle in forum New To Java
    Replies: 0
    Last Post: 03-22-2011, 08:07 AM
  2. Using Regex
    By ron87 in forum New To Java
    Replies: 4
    Last Post: 09-12-2010, 06:26 AM
  3. Please Help - Regex
    By BeeGee in forum Advanced Java
    Replies: 0
    Last Post: 04-28-2010, 05:28 PM
  4. Help with regex
    By SteroidalPsycho in forum New To Java
    Replies: 2
    Last Post: 03-29-2010, 12:40 AM
  5. Using regex
    By SteroidalPsycho in forum New To Java
    Replies: 0
    Last Post: 03-28-2010, 11:07 PM

Posting Permissions

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