Front page | perl.beginners |
Postings from March 2002
Re: regex question
Thread Previous
|
Thread Next
From:
Boris Zentner
Date:
March 13, 2002 02:51
Subject:
Re: regex question
Message ID:
200203131051.LAA30661@al.brain.de
Hi Martin,
>
>
> i have a long text file. in this text file several strings of the form:
> ### filename.jpg ### are embedded.
>
> how should a regex look that takes following:
>
> <text before> ### filename.jpg ### <text after>
>
> and returns
>
try this.
s/### (\w+\.jpg) ###//;
the filename is in $1
> <text before> <text after>
>
> and the filename.jpg saved in a $
>
> :o)
>
> martin
--
cu boris
Wenn ich nur mehr Zeit gehabt hätte, hätte ich Dir einen kürzeren
Brief geschrieben.
-- Pascal
Thread Previous
|
Thread Next