Need help with RegEx...

Nick Syrax
2012-12-20
2012-12-20
  • Nick Syrax
    Nick Syrax
    2012-12-20

    I have some text from Adobe Captivate that I used for text2speech. My supervisor wants to review the text for editorial purposes so I am going to have to copy/paste it all. Problem is it's chock full of VTML tags that would likely confuse things. So I was wondering what RegEx string I could use to delete any text between <> as well as the <>. Is this possible? It would save me a LOT of time! I have several pages of text to do this to. TIA!

     
  • Loreia2
    Loreia2
    2012-12-20

    Hi Nick,

    do it like this:
    Find: <.*>
    Replace: leave empty

    BR,
    Loreia

     
  • Nick Syrax
    Nick Syrax
    2012-12-20

    Tried it and it deleted everything. Below is an example of one line of dialogue:

    < vtml_speed value="95" >Welcome to the < vtml_pause time="25"/ >eLearning overview on how to take out a new loan!< /vtml_speed >

    What I would like to end up with, if possible is as follows:

    Welcome to the eLearning overview on how to take out a new loan!

    Hope this makes sense. Thanks!

     
    Last edit: Nick Syrax 2012-12-20
  • Loreia2
    Loreia2
    2012-12-20

    I also tried it, and it worked just fine.
    Which Npp version are you using?

    That sample does not show any < > characters.
    Try to add some space after (and before) < > characters.

    BR,
    Loreia

     
  • Nick Syrax
    Nick Syrax
    2012-12-20

    Yeah, I can't figure out the markdown thing. Ima newb

     
  • Loreia2
    Loreia2
    2012-12-20

    Use space around < and >

    That should do the trick.

    BR,
    Loreia

     
  • Nick Syrax
    Nick Syrax
    2012-12-20

    Got it, see above. Thanks! :0)

     
  • Loreia2
    Loreia2
    2012-12-20

    Ok, I see it now.
    That sample works fine with my RE. Please update Npp to latest version, and it should work for you too.

    BR,
    Loreia

     
  • Nick Syrax
    Nick Syrax
    2012-12-20

    I'm running 6.2.3. Tried it again and it deletes everything.

     
    Attachments
  • Loreia2
    Loreia2
    2012-12-20

    Hi Nick,

    I forgot to include ? to shorten re matches:

    Do ti like this:
    Find <.*'>
    REplace: empty

    BR,
    Loreia

     
  • Nick Syrax
    Nick Syrax
    2012-12-20

    That did it!!!! Thanks!!!!