Interests: Regular Expressions, Linux CLI one-liners, Scripting Languages and Vim

GitHub: https://github.com/learnbyexample

Books: https://leanpub.com/u/learnbyexample

  • 55 Posts
  • 55 Comments
Joined 2 years ago
cake
Cake day: June 20th, 2023

help-circle



  • Here’s a solution with perl (assuming you don’t want to change http/https after the start of ( instead of start of a line):

    perl -pe 's/\[[^]]+\]\(\K(?!https?)[^)]+(?=\))/lc $&=~s|%20|-|gr/ge' ip.txt
    
    • e flag allows you to use Perl code in the substitution portion.
    • \[[^]]+\]\(\K match square brackets and use \K to mark the start of matching portion (text before that won’t be part of $&)
    • (?!https?) don’t match if http or https is found
    • [^)]+(?=\)) match non ) characters and assert that ) is present after those characters
    • $&=~s|%20|-|gr change %20 to - for the matching portion found, the r flag is used to return the modified string instead of change $& itself
    • lc is a function to change text to lowercase





























  • I started reading progression fantasy on Royal Road earlier this year (a site for posting web serials). Here’s my current follow list (excluding stories that are on hiatus):

    • The Runic Artist — isekai, rune-based crafting, good mix of action and slice-of-life
    • The Broken Knife — Kobold MC with a dragon companion, dark but compelling read, excellent worldbuilding
    • Demon World Boba Shop — cozy isekai, nice characters
    • Dual Wielding — slow burn, tale of two friends (both very talented), writing is good, action scenes get dark and intense
    • Legends and Librarians — cozy romance, magical library (not litrpg/progression), plenty of cute creatures
    • An Otherworldly Scholar — isekai, teacher MC, good worldbuilding, nice romance, great characters, plenty of twists, adventure and danger, especially enjoyed the slice-of-life stuff
    • Archmage from Another World: Gaining Administrator Access — isekai from another fantasy world, lighthearted fun with good set of characters, no looming world-level threats so far
    • Underkeeper — MC is a recent magical academy graduate, good at magic but works as underkeeper (no money/connections to join adventurer groups), got darker than I’m comfortable with, but loved the characters and the demon companion
    • Immovable Mage — good worldbuilding, characters, plot twists and detailed magic system, clever use of plot events pushes MC towards OP, would suggest to read at least till the end of 2nd arc
    • Level One God — likeable MC, cool magic stuff I haven’t seen before, some bad moments are really dark, good writing
    • Spire’s Spite — criminally underrated with only 100+ followers, mostly been spire climbing so far, good magic system, dark and has some stuff I don’t like but overall I’ve enjoyed it
    • Blood Curse Academia — overall I enjoyed the combination of action, learning and mystery, but a lot of weird coincidences and stuff didn’t make sense
    • Mana Mirror — loved the concept of mana garden and the myriad customization options, writing and plot was easy to follow, third volume is the best so far
    • The Maid Is Not Dead — writing felt like traditionally published epic fantasy with progression elements, slow burn but events are starting to escalate
    • Dark Lord’s Last Call — MC’s soul is swapped with the dark lord, plans to open a tavern, enjoyable light-hearted read
    • Orphan — I usually ignore the litrpg math but this one takes it a bit too far! characters all have flaws (though sometimes it becomes a bit too irritating), good worldbuilding and mystery
    • Rules of Biomancy — 70 year old herbalist MC with a secret past comes across two isekai-ed people in danger of dying and decides to help, enjoying a lot