• 0 Posts
  • 11 Comments
Joined 2 years ago
cake
Cake day: June 26th, 2023

help-circle

  • bizdelnick@lemmy.mltoLinux@lemmy.mlSuggestions for my next distro
    link
    fedilink
    arrow-up
    3
    arrow-down
    8
    ·
    edit-2
    6 hours ago

    You won’t get it here. Everybody will recommend his favorite distro.

    IMHO the best would be to solve your problems in OpenSUSE. This is definitely possible. You really need to switch to another distro only if you feel youself uncomfortable with the release cycle, package management tools or packages present in the repo of your current distro.







  • As I see, you’ve already got an answer how to convert text to lower case. So I just tell you how to replace all occurrences of %20 with -. You need to repeat substitution until no matches found. For such iteration you need to use branching to label. Below is sed script with comments.

    :subst                                         # label
    s/(\[[^]]+\]\([^)#]*#[^)]*)%20([^)]*\))/\1-\2/ # replace the first occurrence of `%20` in the URL fragment
    t subst                                        # go to the `subst` label if the substitution took place
    

    However there are some cases when this script will fail, e. g. if there is an escaped ] character in the link text. You cannot avoid such mistakes using only simple regexps, you need a full featured markdown parser for this.