Jump to content
UBot Underground

Cleaning Spaces/Line Breaks From A Variable


Recommended Posts

Good day all.

 

I've been trying to scrape a variable and it comes in pretty dirty due to the code on the site

 

The scrape ends up looking like this

 

------------------------------

 

#IMPRESSIONS:
          
                                   
                         3,598                    
                         
          Impressions
             

-----------------------------

 

So as you can see there is a lot of weird spacing around the number i need.  I do a replace to get rid of the impressions, that works fine.  Getting rid of the spaces/breaks is causing grief.  You can copy the spaces to a notepage file and find replace them with nothing.  The only problem is that it's not reliable, it'll work for a while then not work.

 

Any reliable ways to clean up these weird spaces so that I get ONLY the number as the variable?  Thanks for your help.

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...