Track the entered answer using the Regular expression

Hi,
I am building a Q&A application which does have user to answer descriptive answer for the question(Text based answer rather than objective)
in this case how we can track the entered answer by the user is the correct one? how we can capture the entered answer and then check with the correct
answer in the DB? Yes we need to use a regular expression , but how we know that entered one is matching with the one in the DB
as the user can answer in lengthy or short form ? Hence please clarify how we can proceed?
Thanks.

797836 wrote:
Hi,
I am building a Q&A application which does have user to answer descriptive answer for the question(Text based answer rather than objective)
in this case how we can track the entered answer by the user is the correct one? how we can capture the entered answer and then check with the correct
answer in the DB? Yes we need to use a regular expression , but how we know that entered one is matching with the one in the DB
as the user can answer in lengthy or short form ? Hence please clarify how we can proceed?
I don't see how regular expressions help at all with this problem ! What made you think they can help?

Similar Messages

  • $10 for answer: using Pattern - regular expressions and Scanner

    I'm trying to read input messages using Scanner. The messages are in format: word1 word2 number. the "number" is followed by "C null terminator" i.e. '\u0000' character.
    I tried this:
    Scanner input;
              Pattern pat = Pattern.compile("(\\w+) (\\w+) (\\d+)\u0000");
              input.useDelimiter(pat);
              while (input.hasNext(pat)) {
    The input is there and in correct format, but it hangs hasNext(pat) - as if input is not correct. What did I do wrong? Thanks in advance - thsi is urgent, I'd be glad to send you $10 for correct answer via PayPal.
    Message was edited by:
    MrM654

    Here is a Regex and a Scanner implementation.
    The price is $20 because there are 2 ways to do this.
    Plus at least a $10 courtesy tip.
    import java.util.Scanner;
    import java.util.regex.*;
    public class RegexTest{
    public static void main(String[] args){
         new RegexTest();
    public RegexTest(){
         String input = "word1 word1 1\u0000 word2 word2 2\u0000 word3 word3 3\u0000";
         Pattern pattern = Pattern.compile("(\\w+ \\w+ \\d+\\u0000)");
         Matcher matcher = pattern.matcher(input);
         while(matcher.find() == true){
         System.out.println("Match: " + matcher.group());
         String input = "word word 1\u0000 word2 word2 2\u0000 word3 word3 3\u0000";
         Pattern pattern = Pattern.compile("(\\w+) (\\w+) (\\d+)\\u0000\\s*");
        Scanner scanner = new Scanner(input);
         String result;
         while((result = scanner.findInLine(pattern)) != null){
         System.out.println("Match: " + result);
         System.out.println("Done.");
    }Edit: Changed Pattern to end with \\s* to be insensitive to ending spaces

  • How many airport express can I add to my network for the purpose of using the airport express to send audio signal to different rooms in the house? I'm interested I'm running about six different zones.

    How many airport express can I add to my network for the purpose of using the airport express to send audio signal to different rooms in the house? I'm interested I'm running about six different zones.
    What I'm looking to do is to have self powered in ceiling speakers in every room in my house with out having to run wires to every room to carry the audio signal. I would like to use the airport express to do the job of carting the audio signal.
    Here's my set up now I have an airport extreme and one airport express that I use to carry audio to one room.

    FWIW. I have used up to four AirPort Express Base Stations (AX) for streaming sucessfully in pretty much the way you have described. I didn't have a need to try more so I can't attest that more would or would not work.

  • Track my ipod touch using the built in icloud...track my ipod touch using the built in icloud

    i was trying to track my ipod touch using the built in icloud but i wanted to get rid of the lock i put on it but instead it disabled icloud how do i get it back?

    Was this the X that you clicked on. When I click this I get the following message.

  • My macbook froze up. Finger gestures work, but I cant close out of any windows. How do I close out the windows without using the track pad?

    My macbook froze up. Finger gestures work, but I can't close out of any windows by clicking on the red "X". How do I close out the windows without using the track pad?

    Command + W will close a window. Command + Q will quit a program.

  • I'm using LR 5.6.  The Enter key should increase the exposure but it increases Contrast instead.  How can I make the Enter key adjust the exposure?

    Hello
    As explained in the heading, I'm using LR 5.6 on a PC (Win 7).  The Enter key should increase the exposure but it increases Contrast instead.  How can I make the Enter key adjust the exposure, as it should?  I have reset the settings to Default in the Develop module but to no avail.  Please help!  Thanks.
    Kind Regards
    Farrukh Hyder

    I am not aware that the ENTER key should increase exposure, and it certainly does not increase exposure (or any other slider) on my Lightroom 5.6 (Windows 7)
    If you click on the word Exposure, then the + and - keys increases or decrease exposure by 0.1 or -0.1

  • HT5312 My stops because of the wrong answer to the secret question, and I want to use it for evil application from Apple Store?

    My stops because of the wrong answer to the secret question, and I want to use it for evil application from Apple Store?

    Hello mr sami,
    Thank you for the details of the issue you are experiencing with your security questions.  I found an article with some useful information if you cannot remember the answers to your security questions:
    What should I do if I don't remember the answers to my Apple ID security questions?
    Try answering them at least once to see if you can get them right, even if you are not sure you remember the answers to your security questions.
    If you are confident you can't remember them, try one of the following:
    If you have three security questions and a rescue email address
    sign in to My Apple ID and select the Password and Security tab to send an email to your rescue email address to reset your security questions and answers.
    If you have one security question and you know your Apple ID passwordsign in to My Apple ID and select the Password and Security tab to reset your security question.
    If you have one security question, but don't remember your Apple ID password
    contact Apple Support for assistance. Learn more about creating a temporary support PIN to help Apple confirm your identity when you contact Apple Support.
    Note: If you have forgotten your password and answer your security questions incorrectly too many times in a row, you will be unable to try to answer your security questions for a period of time. During that time you will not be able to reset your password and will not have access to your account.
    You can find the full article here:
    Apple ID: All about Apple ID security questions
    http://support.apple.com/kb/HT5665
    If you continue to have issues, please contact our Account Security Team as outlined in this article:
    Apple ID: Contacting Apple for help with Apple ID account security
    http://support.apple.com/kb/HT5699
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • HT5312 I forgot the security answer also the email is incorrect. So can i use the other email to know the answer of security question

    I forgot the security answer also the email is incorrect. So can i use the other email to know the answer of security question

    The reset link will only work for the rescue email address that you currently have on your account. If it's wrong (you won't be able to change it until you can answer 2 of your questions) then you will need to contact iTunes Support / Apple to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset you can then use the steps half-way down the page that you posted from to correct your rescue email address for potential future use

  • Use a regular expression to do this...

    I need to process this line : "STRTsomeEND.STRTsome2END.STRTsome3END"
    to get an array with this values :
    String[] processedLine = {
    {"STRTsomeEND."}
    {"STRTsome2END."}
    {"STRTsome3END."}
    I tried to use this regular expression to do the work: (STRT[.*]END.)+ but doesn't work. Also I tried with this expresion STRT[.*]END. But I only got the first ocurrence ("STRTsomeEND") .
    Can anybody help me?

    zkropotkine wrote:
    1) "." is a regex flag.I saw in the table and it said that the "." symbol doesn't need the escape: )
    when you ask a question and then someone gives you advice you should
    give them the benefit of the doubt (for at least a little while).
    did you take a moment to try to understand what i was saying about escaping the "."?
    anyway, your regex should be:
    (START)(.*?)(END)\ \ .
    the "?" after the "\*" means "reluctant". you dont want the ".\*" to grab up everything.
    with the reluctant modifier "?" the regex should stop and grab the first available "END".
    and finally, if you meant the "." at the end of "STARTsomethingEND." literally then:
    you need to escape the "."

  • After doing a Google search, I click on a link and go to the searched web page.  When I go back to the Google page using the back button the links I originally clicked on no longer show as "greyed out".  Any idea what is going on with the browser?

    After doing a Google search, I click on a link and go to the searched web page.  When I go back to the Google page using the back button the links I originally clicked on no longer show as "greyed out".  Any idea what is going on with the browser?

    Type '''about:config''' in the Location (address) bar and press the "Enter" key. When you see a warning, click '''I'll be careful, I promise!''' button.
    * Preferences that have been modified are shown as '''bold (user set)'''.
    * Preferences can be '''Reset to the default''' or changed via the right-click context menu.
    -> In the '''Filter bar''', type '''browser.sessionhistory.max_entries'''
    * Right click the preference '''browser.sessionhistory.max_entries''' and click '''Modify'''
    * Change value from 0 to whatever you want over 0 (Default value is 50)
    * click OK
    -> Close the '''about:config''' tab and then Restart Firefox.
    See this post:
    * https://support.mozilla.com/en-US/questions/860894#answer-229574
    Check and tell if its working.

  • Error "Extend the destination address using the location input help"

    Hi experts,
    I got warning while creating travel expense from existing travel request.
    the warning appear like this "Extend the destination address using the location input help"
    I don't want user to enter detail of address trip destination.
    how to avoid this?
    thanks
    Edited by: nzworld on Apr 29, 2011 5:42 AM

    Hi,
    If you are using ESS and you get the warning message when you enter details for a particular expense type. Please follow the config and hide the location details. Then you will not get this error message.
    SAP Customizing Implementation Guide > Financial Accounting (New) > Travel Management > Travel Expenses > Dialog and Travel Expenses Control > Dialog Control > Field Control for Additional Receipt Information.
    Enter your trip provision variant, select the expense type for which you dont want to enter the location details and then select details. Search for the variable location, select hide radio button and save.
    Please let me know if you have further clarifications.
    Regards,
    Raj

  • The "enter" key on the numeric keypad of my external mac keyboard has stopped working. Help!

    The "enter" key on the numeric keypad of my external mac keyboard has stopped working with my Macbook pro.  If I plug the keyboard into any other computer, that entier key works fine. I'm using a standard Mac wired keyboard, & it's worked fine for 2 years now. Help!
    This is the keyboard I am using: http://store.apple.com/us/product/MB110LL/B/apple-keyboard-with-numeric-keypad
    Not sure what I might have accidentily done to disable the enter key. (The normal enter key works fine, just the one on the numeric keypad.)
    Thank you for your help.

    Hi there,
    Do you have any resolution to this problem in the end? Because it happened to me an exact same thing.
    Please share if you have found a solution to your problem. I also cannot think of what I did wrong to disable the Enter key.
    Best Regards,
    Jeffri

  • My problem is after updating to Yosemite does my mail client any longer. I can not even open the mail, and when I "forced closes" mail and try to open it again to go in the entered settings running the colored wheels around and allows me only to forc

    My problem is after updating to Yosemite does my mail client any longer. I can not even open the mail, and when I "forced closes" mail and try to open it again to go in the entered settings running the colored wheels around and allows me only to forcing close again? does anyone have a solution to the above problem?

    You mean the default OS X mail app? Try reinstalling OS X Yosemite if that's the case.
    If you are referring to 3rd party mail applications, that's a compatibility issue. Some apps don't work in the new operating system. You have to wait until the developer updates the app, or you have to revert back to Mavericks to continue using it.

  • How do I remove  the enter key on the numeric keypad as a command key?

    How do I remove the enter key on the numeric keypad as a command key.  I want to use the enter key as a return key.

    Don't.  It will void the warranty.  Take is to an Apple store or an AASP and have them do it.

  • Restrict the users to use the field Unplanned delivery cost at MIRO

    Dear Friends,
    I want to restrict some users to use the unplanned delivery cost at MIRO. It should be displayed as visible to enter for some users and it should be displayed in grey mode not to enter anything for some users. I am asking this to restrict some misutilisation of this field by some users. Can I restrict through profiles?
    Simply, I want to restrict the users to use the field Unplanned delivery cost at MIRO through Profiles of them. Pls help me,, it is impacting our business.
    Regards,
    Venkata Reddy.Mudda

    Hi,
    Check the customization for unplanned cost:
    SPRO -- Materials Management -- Invoice Verification -- Logistics Invoice Verification -- Incoming Invoice -- Configure How Unplanned Delivery Costs Are Posted
    Best Regards
    Anamika

Maybe you are looking for

  • Help needed during generation of ILDT file using irep_parser.pl

    The is is my package which I have annotated REATE OR REPLACE PACKAGE Xxetc_Soa_Req_Apps_Pkg  AS /* $Header: XXETC_SOA_REQ_APPS_PKG .pkb 1.0 2014/03/04 $ */ * This custom PL/SQL package * @rep:scope public * @rep:product CUSTOM * @rep:lifecycle active

  • Radio turns off

    The radio that picks up my wireless service keeps turning off. And I mean continually. I turn it back on and it almost immediately shuts off again. Has anyone else had this issue and any suggestions on fixing it?

  • Way to Convert Blackberry Q5 backup file .bbb to CSV

    Hi All,          i don't have blackberry mobile right now and have only the backup file ( .bbb ) and is there have any possiblities to convert the same to CSV , so please suggest some possible solution and have already tried with some third party app

  • Multitouch not working win8...

    I've got a HP Compaq L2105tm touchscreen monitor. Using Windows 7 I was able to use the multitouch class for AIR, and enable pinch-zoom and such. With Windows 8 now, I no longer can get pinch-zoom working - and Multitouch.supportsGestureEvents now re

  • Component question with textfield

    I'm creating a keyboard entry component for a touchscreen. When the user hits the enter button I want to change a textfield in a movieclip to the text they typed in. The movieclip is outside of the component. There maybe a screen with multiple text e