ebeshero / DHClass-Hub

a repository to help introduce and orient students to the GitHub collaboration environment, and to support DH classes.
GNU Affero General Public License v3.0
27 stars 27 forks source link

Autotagging Cues #710

Closed ajw120 closed 5 years ago

ajw120 commented 5 years ago

Hi when I put this into the find feature \[.+?\] It won't let me include anything into the replace spot and I don't know what to do so that I can tag cues. If anyone can help that would be great!

ebeshero commented 5 years ago

@ajw120 Did you set a capturing group around the part of the stage directions that you want to keep? (Do you want to keep the stuff inside the square brackets?) To make a capturing group, you surround the stuff you want to keep in parentheses. You can then refer to it in the replace with \1 (for the first set of parentheses), \2 (for a second set, etc). Is this what you need in the replace window? Remember to set the <stage> start and end tags in place around your replace.

ajw120 commented 5 years ago

<cue> \1</cue>\2 I have this, is this wrong?

ebeshero commented 5 years ago

Do you have parentheses around your capturing groups in the Find window? Each one of those needs to point to something inside parentheses: Find: (capture-1)(capture-2)

ebeshero commented 5 years ago

@ajw120 So in your find, you told us you have: \[.+?\] With a capturing group, you'd have \[(.+?)\]

And you'd refer to that stuff inside the (.+?) with \1 in your Replace.