• Hail, we're RedGuides. We want you to play six (yes, 6!) EverQuest characters at once. We have scripts and a friendly community to help, please join our playstyle and say hello! 👋
  • We've added LLM sections to our Terms & Rules and Resource Rules, for everyone's sanity & in-game safety.
    Read more
    a. Do not replace your voice with an LLM. This goes for your posts and your scripts. Drafting and editing with a tool is fine, but don't take you out of what you share.
    b. Do not replace your EQ character's voice with an LLM. We don't want scripts that speak over /ooc, /shout or other public channels. This has been an unwritten rule that's kept casino scripts off the site for decades, but we're now compelled to make it clear: keep automated communication private.

    Why Does RG Review Scripts?
    Nearly every LLM-written Lua script we see is making your character do impossible things, and rarely in a way that's beneficial to you. We've seen heavy server hammering, /target over impossible distances when /nav spawn would passively accomplish the same thing, a spawn search that fires 20+ times per second, and other pointless actions that are likely annoying GMs.

    You are welcome to use LLMs as a tool to structure, draft, and edit your work, but please read critically before hitting /lua run

Tech - seeking regexp to fix broken links on RedGuides

Redbot

💻❤️
Moderator
Commits
623
The problem
This link works:
https://www.redguides.com/forums/th...-Puller-Ready-(using-conditions-AND-mq2melee)
This link doesn't:
https://www.redguides.com/forums/th...-Puller-Ready-(using-conditions-AND-mq2melee)

Why?
Our new software dislikes special characters in the URL, such as !_(), while our old software loved them. I wrote a little nginx directive looking for redguides.com/forums/ links to remove special characters when forwarding to the new redguides.com/community. HOWEVER, when we switched over to the new forums, I foolishly did a mysql replace on all the lines containing https://www.redguides.com/forums/ to https://www.redguides.com/community, so now we have URLs with special characters that my nginx directive can't see or fix.

The easiest fix in my opinion is switching the old URLs from "community" back to "forums".

How?
This is where I'm stuck! I need a regex to select "community" in links like this:
https://www.redguides.com/forums/th...-Puller-Ready-(using-conditions-AND-mq2melee)

But not links like this:
https://www.redguides.com/community...er-ready-using-conditions-and-mq2melee.60941/

Anyone up for the challenge? please pm meeee
 
Here's what would have worked,

(redguides\.com\/)community\/threads(\/.*[\(\)\_\!\*].*)$
and the replace,
$1forums/threads$2

However, our database doesn't fully support regex.

Alynel suggests we dump the DB, use sed, import the DB. One issue: how do I regex replace with sed?
 
Last edited:
Tech - seeking regexp to fix broken links on RedGuides

Users who are viewing this thread

Back
Top
Cart