> From: erik dot cumps at icos in belgium
> Sent: Tuesday, October 21, 2003 11:36 AM
Hmm... email-address visible; you ought to conceal it a bit more. Otherwise
you'll eventually end up receiving spam.
It has started over here :-7
> Hi guys,
>
> sorry if this thread was dead but couldn't resist
Hi guys,
sorry if this thread was dead but couldn't resist.
Besides, it makes the start of my workday just that
more bearable... :) (regular expressions for fun and
profit eh)
Simply sed:
sed 's#^ *\(.*[^ ]\) */ *\(.*[^ ]\) *$#.\1.\2.#'
Simply perl:
perl -pe 's/^\s*(.*\S)\s*\/\s*(.*\S)
> From: Brian Dessent
> Sent: Monday, October 20, 2003 10:43 PM
> Hannu E K Nevalainen wrote:
>
> > $ echo ' a b / c d e ' | \
sed -e 's/ *\(.*\) *\/ *\(.*\) */.\1.\2./'
> >
> > .a b .c d e .
> >
> > I want the output to be '.a b.c d e.' - that is; strip out the
> > trailing spaces.
> >
> > HOW
Hannu E K Nevalainen wrote:
> $ echo ' a b / c d e ' | \
> sed -e 's/ *\(.*\) *\/ *\(.*\) */.\1.\2./'
> .a b .c d e .
>
> I want the output to be '.a b.c d e.' - that is; strip out the trailing
> spaces.
>
> HOW do I achieve that? ( \s = any ws, \S = any non ws )
>
> Obviously \(.*\) grabs/i
On Mon, 20 Oct 2003, Hannu E K Nevalainen wrote:
> [snip]
> HOW do I achieve that? ( \s = any ws, \S = any non ws )
>
> Obviously \(.*\) grabs/includes the last space. My brain has stoppped
> working, so right now I can't work around that :-I
Reversed character lists, e.g. '[^ ]', should work po
5 matches
Mail list logo