I used Jquery to have many dynamically generated feedback lines to quiz questions coming from an xml. Sample:
You answered (Yes.) Your patient is at moderate to high risk.
You answered (No.) Your patient is at low to high risk.
You answered (Weekly Dose.) Your patient is at moderate risk.
etc.
How can I find and format different parts of the feedback text? I need to format part of the text with the quotation marks in italic. Also format part of text at the end in bold starting with the word “at” till the period mark?
I guess it would be possible with regular expressions but I haven’t used them.
so far I have the following:
var feedbackString = "<p id='feedbackTxt'>" + currentQuizNode.find("Feedback").text() + "</p>";
$("#quizFeedback").append(feedbackString);
Thank you in advance,
Attila
If you meant to say parenthesis instead of quotation marks then change:
To: