Tricky Sort RegExp challenge
Posted: Wed Nov 07, 2001 2:01 am
Hi,
I am trying to convert the following:
10. This is Question Text
a. Choice a text
b. Choice B text
c. Choice C text
AR choice A feedback
BR choice B feedback
CR choice C feedback
Into this.
10. This is Question text
a. Choice a text
AR choice A feedback
b. Choice B text
BR choice B feedback
c. Choice C text
CR choice C feedback
Since there are numerous questions per file, I need to be able to sort only on the lines within the file. Is there a way to autmatically limit what the Sort command sorts? The Macro doesn't seem to acknowledge selected text.
Also, given the difficulty of multiline RE's I haven't been able to come up with one that accomplishes this. Any suggestions? Am I mising something?
I am trying to convert the following:
10. This is Question Text
a. Choice a text
b. Choice B text
c. Choice C text
AR choice A feedback
BR choice B feedback
CR choice C feedback
Into this.
10. This is Question text
a. Choice a text
AR choice A feedback
b. Choice B text
BR choice B feedback
c. Choice C text
CR choice C feedback
Since there are numerous questions per file, I need to be able to sort only on the lines within the file. Is there a way to autmatically limit what the Sort command sorts? The Macro doesn't seem to acknowledge selected text.
Also, given the difficulty of multiline RE's I haven't been able to come up with one that accomplishes this. Any suggestions? Am I mising something?