Easiest scripting method to merge two text files - Ruby, Python, JavaScript, Java?

前端 未结 6 769
一个人的身影
一个人的身影 2021-01-14 21:14

I have two text files, one containing HTML and the other containing URL slugs:

FILE 1 (HTML):

  • 6条回答
    •  遥遥无期
      2021-01-14 22:14

      The easiest way to do this is to use the language of the listed ones that you are most familiar with. Even if it doesn't produce the neatest solution, you'll get the job done with the least (mental) effort.

      If you know none of them, then Perl is a good option because this is the kind of thing it was designed to do. (I'm assuming that you understand regular expressions ...) And by the look of some of the other answers, Python is a good option too.

    提交回复
    热议问题