[ale] regex assistance

Richard Bronosky richard at bronosky.com
Thu Jan 23 18:06:14 EST 2014


Brock,
You didn't give us enough info to properly answer your question.
1. Is there anything else on the line other than just a number?
2. What language are you open to executing the regex in?
3. How many lines are you expecting and do you care how long the one
pipe delimited line gets?
.!# Bruno #!.


On Thu, Jan 23, 2014 at 1:09 PM, brock at quantifier.org
<brock at quantifier.org> wrote:
>
> Hello, linux neighbors,
>
> I am a regular expression amateur.  I have a text file with a bunch of
> numbers, which looks like this:
>
> 00
> 01
> 02
> 03
> 04
>
> and I need to convert it, so that each number is on one line, and separated
> with the | pipe, so:
>
> 00 | 01 | 02 | 03 | 04
>
> If it's not too much trouble, could someone script-fu something up to solve
> my problem?
>
> Thanks much,
> Robert
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo


More information about the Ale mailing list