Jump to content
UBot Underground

Working With Lists (Clean Text, Trim Or Other Functions)


Recommended Posts

Picture for reference - 

 

https://ibb.co/4dMDrnB

 

I'm working on a project that involves a lot of lists - Something I don't have a lot of experience with at this point. I'm trying to clean up the lists in the picture, but I'm unsure how to string together the correct commands to accomplish this. 

 

I'm assuming that $Trim or $Clean Text would work, or possibly REGEX, but I have a few questions.

 

How would you use the $Trim command on a list? Or do you have to set up a loop using the $next list item and $trim each item in the loop? Is there a best practice for cleaning up lists?

 

Thanks for your help!

Link to post
Share on other sites

no direct $trim command for list.

1. loop list and $trim each item

2. 

add list to list(%Test,$list from text($replace regular expression("Adriana C. Ocampo UriaAlbert Einstein
Anna K. Behrensmeyer
Blaise Pascal

Caroline Herschel

Cecilia Payne-Gaposchkin","\\n\\n","
"),$new line),"Delete","Global")

3. use plugin.

Link to post
Share on other sites

Pash - Which plugin are you referring to?

 

not sure other this in plugin "Advanced Data Text File"

add list to list(%Test,$find regular expression("Adriana C. Ocampo UriaAlbert Einstein
Anna K. Behrensmeyer
Blaise Pascal

Caroline Herschel

Cecilia Payne-Gaposchkin",".*?\\n"),"Don\'t Delete","Global")
plugin command("Advanced Data Text File.dll", "list remove empty", %Test)
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...