Jump to content
UBot Underground

Clean up scraped .txt files


Recommended Posts

How can I remove characters such as "[" or "{" (without quotes) from a .txt file? I am scraping pages for content and want to clean them up a bit. Thanks!

Link to post
Share on other sites

One of the easiest ways may be to use the $replace regular expression feature. If not, then just use the $replace command. Set the contents of the text file to a variable. Then set the same variable again using the $replace command as the content. Let me know if that doesn't make sense and I'll provide an example.

 

John

Link to post
Share on other sites

Ok, here you go. The first part creates the list, saves it to a file and then navigates to that file to show you what is there. It then pauses. Everything after the pause is cleaning the list, and it will show you the new list after it's cleaned.

cleaning list.ubot

Link to post
Share on other sites
  • 9 months later...

Ok, here you go. The first part creates the list, saves it to a file and then navigates to that file to show you what is there. It then pauses. Everything after the pause is cleaning the list, and it will show you the new list after it's cleaned.

 

 

John, can you put up a ver. 4.* of the example you have here?

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