[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: HTML img tags
From: |
Konstantin Shakhnov |
Subject: |
Re: HTML img tags |
Date: |
Wed, 14 Dec 2016 16:27:31 +0300 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Wed, Dec 14, 2016 at 11:48:01AM +0100, tomas@tuxteam.de wrote:
> Or, just "pulling in" the sed (and consolidating it with the already
> present `replace-regexp-in-string'):
>
> (replace-regexp-in-string
> "^.* \\([0-9]+\\)x\\([0-9]+\\) \\(:?.\\|\n\\)*$"
> "width=\\1 height=\\2"
> (shell-command-to-string
> (format "identify %s" filename)))
Great idea.
> The funny construction at the end of regexp \\(:.\\|\n\\) is there
> because dot alone won't match the \n. I don't know whether this
> can be expressed more readably/elegantly.
"^.* \\([0-9]+\\)x\\([0-9]+\\) .*\n$" works well. Or
"^.*\\([0-9]+\\)x\\([0-9]+\\) .*\n?$" if we not sure if there is an '\n'
at the end of string
- HTML img tags, Hikaru Ichijyo, 2016/12/10
- Re: HTML img tags, Eli Zaretskii, 2016/12/10
- Re: HTML img tags, HASM, 2016/12/12
- Re: HTML img tags, James K. Lowden, 2016/12/13
- Re: HTML img tags, Lars Magne Ingebrigtsen, 2016/12/14
- Re: HTML img tags, Konstantin Shakhnov, 2016/12/14