Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • September 24, 2016, 09:00:26 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: better than textmechanic  (Read 1406 times)

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,445
    • View Profile
    • Donate to Member
better than textmechanic
« on: March 30, 2015, 08:52:35 AM »
hello

do you know any website, or maybe create one! that will be better than textmechanic?

it has really useful tools, but it doesn't cover all the possible situations

for example, it doesn't have a function to convert a list of object1, object2, object3, into a vertical list, etc

I would also like to be able to create all the possible combinations between 2 or 3 lists of strings

etc

any idea?

thanks!

Edvard

  • Coding Snacks Author
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 2,880
    • View Profile
    • Donate to Member
Re: better than textmechanic
« Reply #1 on: March 30, 2015, 10:07:09 PM »
For the first request, not a website, but a command-line tool.

Sedw:
Quote
sed (stream editor) is a Unix utility that parses and transforms text, using a simple, compact programming language.


You want a comma-separated list transformed into a vertical list?
sed 's/, /\n/g' comma_list.txt > vert_list.txt

Sed for windows can be found here: http://gnuwin32.sour...net/packages/sed.htm

The combinations of strings will have to be done as a programming exercise.  Eric Lippert, a C# compiler dev for Microsoft, has an interesting, though kinda technical, series on just such a thing which is known as Context-Free Grammar which is important in the design of programming languages.  Don't know if it'll help at all, but I couldn't do any better.
http://blogs.msdn.co...ere-is-part-one.aspx

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,394
    • View Profile
    • Donate to Member
Re: better than textmechanic
« Reply #2 on: March 31, 2015, 01:27:32 AM »
In Powershell:
Code: PowerShell [Select]
  1. $a = Get-Content comma_list.txt ; $a.Split(",") >> vert_list.txt

For word permutations in Powershell, see here.
« Last Edit: August 31, 2015, 09:32:55 PM by 4wd »

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,445
    • View Profile
    • Donate to Member
Re: better than textmechanic
« Reply #3 on: March 31, 2015, 06:52:15 AM »
thanks!
as for the latter? to generate all the possible combinations of two lists of strings?

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,445
    • View Profile
    • Donate to Member
Re: better than textmechanic
« Reply #4 on: March 31, 2015, 12:10:41 PM »
also guys, I need this to work in any pc, that's why I want it in a website and not in a script

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,394
    • View Profile
    • Donate to Member
Re: better than textmechanic
« Reply #5 on: March 31, 2015, 07:25:44 PM »

sifu99

  • Supporting Member
  • Joined in 2015
  • **
  • Posts: 9
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: better than textmechanic
« Reply #6 on: April 01, 2015, 06:13:40 AM »
String Splitting
Great find. Thanks.
I especiallly love its link to grepyy.com  :)