1 Reply Latest reply on Dec 4, 2009 4:10 AM by StellaLuna

    Can Search and Replace use Wild Card Characters?



      Can Search and Replace use Wild Card Characters?




      I just wondered can Search and Replace use wild card characters?


      I'd like via a script to go to a specified text field and select from the 'top' of the field to a given point - then delete the selected data, the example as follows:


      Search for:

      beginning of search string = top of field

      end of search string = </Metadata>


      There can be different amounts of text between the top of the text field and where the '</Metadata>' text tag is found - thus my desire to use wild card characters.


      As always Thanks in advance for assistance.


      Regards Nick 


        • 1. Re: Can Search and Replace use Wild Card Characters?

          Hello there Nick,


          One possible idea would be to use a global field to hold your wildcard text.  And then use script with Set Field step so it would be like this


          Set Field your text field ; Let(start = Position(text;global;1;1);Middle(text;start + Length(global) ; Length(text)))


          this will save everything in the field past the global contents you enter. you might also want to protect that something is first put into that global field.  And you might want to include a possible undo script step in case  something goes wrong or put this into a calc field to view the results and then just setting the field with the calc if the results are correct.