develooper Front page | perl.perl6.users | Postings from June 2018

Re: need second pair of eyes

Thread Previous | Thread Next
Timo Paulssen
June 13, 2018 00:47
Re: need second pair of eyes
Message ID:
My recommendations:

    if $line.contains(all("wine-patched/archive/staging-/", ".tar.gz")){ }

    # if the path has to be at the beginning and the extension at the end,
    # which your original regex doesn't require, but it's probably right
    if $line.starts-with("wine-patched/archive/staging-/") &&
$line.ends-with(".tar.gz") { }

    if $line ~~ m{ "wine-patched/archive/staging-/" .* ".tar.gz" } { }

What do you think?
  - Timo

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About