[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] regex assistance
- Subject: [ale] regex assistance
- From: richard at bronosky.com (Richard Bronosky)
- Date: Thu, 23 Jan 2014 18:06:14 -0500
- In-reply-to: <[email protected]>
- References: <[email protected]>
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