anotherhoward,

So you’re saying that the input text will have the correct answers for each 
question underlined?

This seems challenging:

* A regular expression will not detect text formatting such as underlining - in 
fact in plain text such as what we work with in BBEdit, there IS no 
underlining. Some word processors allow searching by text formatting; whether 
they’re scriptable I don’t know.

* It’s your work :), but it seems tedious to have to manually underline or 
otherwise mark the correct answers for each of up to 99 questions, especially 
if the only reason to do so is to help with this transformation. When I’ve 
built quizzes, the answers are in a separate index file that is 
programmatically accessible for grading quizzes; such a thing would also be 
useful for the kind of script that could transform your input into your desired 
output. 

# Answers_Quiz_016.txt
Q       A
1       a
2       c
3       a
4       d
5       c
...


* I suppose this is also a matter of what control you have over the input - the 
set of questions and the knowledge/designation of the correct answers. Also, 
how frequently you have to do this.

More description?

    — Bruce

_bruce__van_allen__santa_cruz_ca_





> On Sep 13, 2023, at 10:11 AM, 'anotherhoward' via BBEdit Talk 
> <bbedit@googlegroups.com> wrote:
> 
> 
> Bruce,
> 
> Please look at my last response, and let me know if that’s provides the 
> needed information.
> 
> Thanks,
> Howard
> On Wednesday, September 13, 2023 at 1:06:21 PM UTC-4 Bruce Van Allen wrote:
> Here’s what I think what Kevin is getting at: if you want a generalized 
> method that works for every/any question, not just the three in your example, 
> then that method has to know which answer to designate as correct. 
> 
> E.g., you’ve said there can be as many as 99 questions; which answer for 
> question 3 would be the correct one? For question 4? etc. 
> 
> There’s nothing in image 1 (the input) that indicates whether a), b), c), or 
> d) is the correct answer for each question. 
> 
> — Bruce 
> 
> _bruce__van_allen__santa_cruz_ca_ 
> 
> 
> 
> 
> 
> > On Sep 13, 2023, at 9:55 AM, 'anotherhoward' via BBEdit Talk 
> > <bbe...@googlegroups.com> wrote: 
> > 
> > Kevin, 
> > Is this of help? I’ve underlined the correct answers in the input. 
> > Howard 
> > 
> > Here is the input in text format: 
> > 1. Why is the "Description" component important when reflecting on sports? 
> > a) It helps you set future goals. 
> > b) It provides context and sets the stage for reflection. 
> > c) It summarizes the main lessons learned. 
> > d) It assesses the positive and negative aspects. 
> > 
> > 2. Why is the "Evaluation" component important? 
> > a) This is choice one. 
> > b) This is choice two. 
> > c) This is choice three. 
> > d) This is choice four. 
> > 
> > 10. Why is the "Analysis" component important? 
> > a) This is choice one. 
> > b) This is choice two. 
> > c) This is choice three. 
> > d) This is choice four. 
> > 
> > On Wednesday, September 13, 2023 at 12:51:46 PM UTC-4 anotherhoward wrote: 
> > Kevin, 
> > 
> > The correct answers are shown in Image 2. 
> > 
> > Here are the correct answers: 
> > Question 1: C 
> > Question 2: B 
> > Question 3: C 
> > 
> > HowardOn Wednesday, September 13, 2023 at 12:34:59 PM UTC-4 Kevin Shay 
> > wrote: 
> > How do you know which answer is correct for each question? 
> > 
> > On Wed, Sep 13, 2023 at 11:32 AM 'anotherhoward' via BBEdit Talk 
> > <bbe...@googlegroups.com> wrote: 
> > The image below (IMAGE 1) shows a sample of the original format of the 
> > multiple choice questions I need to convert into another format. As there 
> > could be from 10-99 of them, I made the third sample #10 so that one has a 
> > double-digit number. 
> > 
> > If the solution can be presented in REGEX, that would be helpful; however, 
> > I am open to other solutions. 
> > 
> > Howard 
> > 
> > IMAGE 1 
> > 
> > The image after this one (IMAGE 2) shows how I need the first image's 
> > contents reformatted. 
> > 
> > Here is the input in text format: 
> > 1. Why is the "Description" component important when reflecting on sports? 
> > a) It helps you set future goals. 
> > b) It provides context and sets the stage for reflection. 
> > c) It summarizes the main lessons learned. 
> > d) It assesses the positive and negative aspects. 
> > 
> > 2. Why is the "Evaluation" component important? 
> > a) This is choice one. 
> > b) This is choice two. 
> > c) This is choice three. 
> > d) This is choice four. 
> > 
> > 10. Why is the "Analysis" component important? 
> > a) This is choice one. 
> > b) This is choice two. 
> > c) This is choice three. 
> > d) This is choice four. 
> > 
> > Here is how I need the first image's contents reformatted. 
> > 
> > IMAGE 2 
> > 
> > In the reformat: 
> > 1. Each item starts with "MC." 
> > 2. Immediately after "MC" is the multiple-choice question. 
> > 3. Then, for each item, there are the four possible answers, from "Choice 
> > 1" to "Choice 4." 
> > 5. Each possible answer is followed by "Correct" (once) and "Incorrect" 
> > (three times), with the position of "Correct" varying. 
> > 6. Each of an item's components except its last one needs to be followed by 
> > a TAB press. The last one in each item is followed by a RETURN. 
> > 
> > 
> > -- 
> > This is the BBEdit Talk public discussion group. If you have a feature 
> > request or need technical support, please email "sup...@barebones.com" 
> > rather than posting here. Follow @bbedit on Twitter: 
> > <https://twitter.com/bbedit> 
> > --- 
> > You received this message because you are subscribed to the Google Groups 
> > "BBEdit Talk" group. 
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to bbedit+un...@googlegroups.com. 
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/bbedit/c26f2d21-c067-4489-8c90-0b9e7475c80dn%40googlegroups.com.
> >  
> > 
> > -- 
> > This is the BBEdit Talk public discussion group. If you have a feature 
> > request or need technical support, please email "sup...@barebones.com" 
> > rather than posting here. Follow @bbedit on Twitter: 
> > <https://twitter.com/bbedit> 
> > --- 
> > You received this message because you are subscribed to the Google Groups 
> > "BBEdit Talk" group. 
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to bbedit+un...@googlegroups.com. 
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/bbedit/077eb64d-c854-42ca-87d0-628d6a15e92dn%40googlegroups.com.
> >  
> 
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a feature 
> request or need technical support, please email "supp...@barebones.com" 
> rather than posting here. Follow @bbedit on Twitter: 
> <https://twitter.com/bbedit>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to bbedit+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/bbedit/70132027-fcfd-49e2-ad33-da99f628543en%40googlegroups.com.

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/D51DA909-2DF6-46B4-8B2A-C4B0FE489677%40cruzio.com.

Reply via email to