User Tag List

Results 1 to 3 of 3

Thread: Removing a newlines from multiline text?

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export Module

    Join Date
    Jun 2006
    Location
    Melbourne, Australia
    Posts
    765
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Removing a newlines from multiline text?

    I'm using the Regular Expressions object in conjunction with the edit object.

    I am trying to write an expression to remove the newline (carriage return) from edit object.

    My object is to put all the text in one line so I can paste it to a file name. Anyway when I paste the multiline edit box into the single line edit box I get "blank box blank box" and no matter what I try to put in the search criteria to replace I can't figure it out.

    I have tried copying and pasting a newline and \r.

    Anyone got anything I could try?

  2. #2
    Clicker Multimedia Fusion 2 Developer
    Jax's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    693
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Removing a newlines from multiline text?

    This works for me:

    ReplaceSRF$( "Regular Expressions object", Edittext$( "Edit Box" ), "\n", " ")


    i.e. \n

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export Module

    Join Date
    Jun 2006
    Location
    Melbourne, Australia
    Posts
    765
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Removing a newlines from multiline text?

    Quote Originally Posted by Jax
    This works for me:

    ReplaceSRF$( "Regular Expressions object", Edittext$( "Edit Box" ), "\n", " ")

    i.e. \n
    Thanks heaps for the heads up, that gave me the boost to figure the rest of it out.

    I found \n still didn't clean things up like I wanted, I needed to add a \r and a double blank.
    I ended up doing the following.

    ReplaceSRF$( "Regular Expressions object", Edittext$( "Edit Box" ), "\r\n", " ")
    ReplaceSRF$( "Regular Expressions object", Edittext$( "Edit Box" ), "\r\n", " ")
    ReplaceSRF$( "Regular Expressions object", Edittext$( "Edit Box" ), "\r\n", " ")
    ReplaceSRF$( "Regular Expressions object", Edittext$( "Edit Box" ), " ", " ")
    ReplaceSRF$( "Regular Expressions object", Edittext$( "Edit Box" ), " ", " ")
    ReplaceSRF$( "Regular Expressions object", Edittext$( "Edit Box" ), " ", " ")

    This basically cleaned up up to four line of text into one line.

    Once again thanks for your help Jax.

Similar Threads

  1. Editbox, multiline, text align center and autoscroll horizontal (BUG?)
    By iOSC in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 8th April 2013, 08:53 PM
  2. [BUG] Embeded fonts don't have NewLines, or wraping text
    By UrbanMonk in forum SWF/Flash Export Module Version 2.0
    Replies: 1
    Last Post: 2nd April 2013, 06:55 AM
  3. Edit Box as a large text field? Also, Multiline bug.
    By ratty in forum iOS Export Module Version 2.0
    Replies: 1
    Last Post: 18th November 2012, 05:36 PM
  4. Removing Text from Edit Box?
    By Jesse in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 16th July 2008, 07:04 PM
  5. String objects dont make newlines durint runtime
    By Blizna in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 24th March 2007, 09:35 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
  •