[ale] regex assistance

brock at quantifier.org brock at quantifier.org
Fri Jan 24 09:57:29 EST 2014


Thanks everyone. This gives me plenty to work with.  Regarding Bruno's 
question, there's nothing else on the line, though since it's one line, I 
can change that easily.  I tend to prefer bash, though I'm open to 
learning new things.  The whole thing is about 500 lines, so it's not too 
big, so the difference between sed and tr were negligible.

Thanks everyone,
Robert

On Thu, 23 Jan 2014, Richard Bronosky wrote:

> 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
> _______________________________________________
> 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