User Tag List

Results 1 to 4 of 4

Thread: Search and edit sentence in text

  1. #1
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jul 2006
    Location
    Denmark
    Posts
    1,812
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Search and edit sentence in text

    Hi.

    I've got this text where the sentence "function update()" appears several times. I can't figure out a way for this, but I want to search for every appearence of that sentence and change it to "function update1()", "function update2()" etc., for each time it appears.

    Any help?

  2. #2
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jun 2006
    Location
    England
    Posts
    3,546
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Search and edit sentence in text

    If it is in a text file or similar then you can use the Substring Replace object or String Parser 2. If its in an expression then you'll have to do it manually.
    .:::.Joshtek.:::.

  3. #3
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jul 2006
    Location
    Denmark
    Posts
    1,812
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Search and edit sentence in text

    It's in a text file. I tried String Parser 2, but I can only get it to change all results of the sentence to ex "functio update1()" or "update2()" but not edit them to their appearence number.

  4. #4
    No Products Registered

    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    1,141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Search and edit sentence in text

    It can be done with String Parser 2.

    Try something like:

    * Start of Frame
    > String Parser: Set source string to <string>
    > Start loop "rep" numberOfSub( "String Parser", "function update()")

    * On loop "rep"
    > String Parser: Set source string to
    insert$( "String Parser", "function update"+Str$(LoopIndex("rep")+1)+"()", indexOfSub( "String Parser", "function update()", LoopIndex("rep")+1))

    * Start of Frame
    > String Parser: Set source string to remove$( "String Parser", "function update()")

    String Parser will now hold the target string.

Similar Threads

  1. Sentence by sentence or line by line movement in Rich Text object?
    By ratty in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 17th March 2013, 11:36 PM
  2. SQLite 3 SELECT syntax for using an edit box as search field
    By Avantar in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 16th September 2012, 11:55 AM
  3. How can I delete duplicate hits from a text search
    By RGBreality in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 26th June 2010, 03:07 PM
  4. (Trying to) develop a unified text search...
    By RGBreality in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 18th June 2010, 09:49 PM
  5. Search inside edit box for text, trigger event.
    By Kingoftaurus in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 13th May 2010, 04:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •