Jump to content
UBot Underground

How To Delete New Line(Or Empty Line) At Table Cell?


Recommended Posts

I created some table from web page..

But it has unwanted string in it like

 

 

"

 

 

ab aa asdads

asasd

 

aaa

 

aa

"

 

How can I delete new line and just make like this

"

ab aa asdads

asasd

aaa

aa

"

?

 

I bought almost paid plugin of ubotstudio, so if you let me know just lines for that, I'll appreciates.

 

Link to post
Share on other sites

Hi, here is how to do it with out any Regex.

set(#text,"

 

 

ab aa asdads

asasd

 

aaa

 

aa","Global")
alert($Remove blanks(#text))
define $Remove blanks(#TEXT) {
    clear list(%F_text)
    clear list(%F_cleaned text)
    add list to list(%F_text,$list from text(#TEXT,$new line),"Delete","Global")
    loop($list total(%text)) {
        set(#F_text NLI,$next list item(%text),"Global")
        if($comparison(#F_text NLI,"!= Does not equal",$nothing)) {
            then {
                add item to list(%F_cleaned text,#F_text NLI,"Don\'t Delete","Global")
            }
        }
    }
    return(%F_cleaned text)
}

Regards,
CD

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...