That is still a lot of work on your end. Why not use a square bracket or } as 
the correct answer then it should be handled in hopefully one pass and no one 
is doing extra work. Just thought…

Wags ;)

WagsWorld
Hebrews 4:15
Ph(primary) : 408-914-1341
Ph(secondary): 408-761-7391

On Sep 13, 2023 at 11:55 -0700, 'anotherhoward' via BBEdit Talk 
<[email protected]>, wrote:
>
> Hi Bruce,
>
> I misunderstood what was being asked and appreciate the time you put into 
> your response. I do have a separate answer file for each of my tests. 
> Further, in the forum, l only underlined the correct answers’ text because I 
> thought that was the information I was being asked for. My school’s LMS will 
> grade the exams for me once I supply it with the correct answers, which is 
> easy for me to do.
>
> To make things easier here, as most of my tests contain no more than 20 
> multiple-choice questions, for now, in the reformat, please just use for all 
> the possible answers for each question (there are four, from
> Choice 1 to Choice 4), the word “Incorrect.” Then, once I have the code that 
> will enable me to reformat a specific test’s questions, it should take me 
> only a few minutes in BBEdit to change the correct answer in each question 
> from “Incorrect” to “Correct.”
>
> Please let me know if you have any questions about what I wrote.
>
> Howard
> > On Wednesday, September 13, 2023 at 1:44:00 PM UTC-4 Bruce Van Allen wrote:
> > > 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 
> > > > <[email protected]> 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 
> > > > > <[email protected]> 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 
> > > > > <[email protected]> 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 
> > > > > "[email protected]" 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 [email protected].
> > > > > 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 
> > > > > "[email protected]" 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 [email protected].
> > > > > 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 "[email protected]" 
> > > > 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 [email protected].
> > > > 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 "[email protected]" 
> 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 [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/bbedit/1d41f9ae-34ee-43bc-833e-1529d3467d28n%40googlegroups.com.

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "[email protected]" 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/7c828561-2483-43a7-9f30-b4d0670172c3%40Spark.

Reply via email to