Regex teaser
Yitzchak Scott-Thoennes
sthoenna at gmail.com
Wed Dec 4 15:55:10 GMT 2013
On Tue, Dec 3, 2013 at 11:55 PM, Paul Makepeace <paulm at paulm.com> wrote:
> Construct an elegant* regex (in perl!) to ensure the end of the string
> contains "string":
>
> is(fqdn('foo'), 'foo.example.com')
> is(fqdn('foo.example.com'), 'foo.example.com')
Maybe I'm just slow, but I see no relation between that task and that
code? Did you misstate something?
/string\z/
Though I'm not sure what you mean by "contains".
More information about the london.pm
mailing list