What's new

HELP! Any regular expression experts here?

Welcome to the only entrepreneur forum dedicated to building life-changing wealth.

Build a Fastlane business. Earn real financial freedom. Live your best life.

Tired of paying for dead communities hosted by absent gurus who don't have time for you?

Imagine having a multi-millionaire mentor by your side EVERY. SINGLE. DAY. Since 2007, MJ DeMarco has been a cornerstone of Fastlane, actively contributing on over 99% of days—99.92% to be exact! With more than 39,000 game-changing posts, he's dedicated to helping entrepreneurs achieve their freedom. Join a thriving community of over 90,000 members and access a vast library of over 1,000,000 posts from entrepreneurs around the globe.

Forum membership removes this block.

MJ DeMarco

I followed the science; all I found was money.
Staff member
FASTLANE INSIDER
EPIC CONTRIBUTOR
LEGACY MEMBER
Read Rat-Race Escape!
Read Fastlane!
Read Unscripted!
Joined
Jul 23, 2007
Messages
43,876
Location
Utah
Rep Bank
$11,277
User Power: 459%
Any reg-ex experts on the board? For the life of me, I can never figure out regular expressions. I'm having a URL redirect problem (for an Htaccess file) and was hoping to find a solution. I've spent a bunch of time on several websites trying to figure out the solution.

Reg-exs have always been like Japanese to me. I tried using this tool to no avail:

Free Online Regular Expression Tester - FreeFormatter.com

Basically I'm looking to solve a problem a described below...

301 Redirect

Code:
OLD PAGE
-------
https://www.thefastlaneforum.com/general-business-discussion/35110-golden-nuggets-tips-processes-how-tos.html

TO THIS NEW PAGE
-------
https://www.thefastlaneforum.com/community/threads/golden-nuggets-tips-processes-how-tos.35110/

Optimally, any link with "general-business-discussion" should redirect to "community/threads/[thread-title].[thread-number]

Looking for a "catch all" for the above, not just the one link redirected.

I know for a reg-ex expert this is easy-peezy like asking someone to translate English to Japanese. Probably is, I know no Japanese and after a few hours of trying to learn I'm no closer to the solution. I picked a bad day to have some caffeine.

Another tool that I found helpful but still haven't got to a solution...

Regex101 - online regex editor and debugger
 
Access Restricted: Unlock 1,000,000+ Posts

Stop Peeking Through the Keyhole.
Open the Door.

You hit a wall because the best advice isn't free—it's earned. Since 2007, MJ DeMarco has been active here daily (99.9% active rate), building a war room for entrepreneurs who refuse to settle for mediocrity.

  • Active Daily: Life-changing content posted dozens of times every day. No dead threads.
  • MJ's Inner Circle: Direct access to the author of The Millionaire Fastlane.
  • Vetted Network: Connect with founders scaling to 7 and 8 figures.
  • Proven Roadmaps: Strategy over motivation. Execution over "hustle porn."
"SCALED TO 6-FIGURE MONTHS"
"Tips and advice here saved me from huge mistakes, others allowed me to scale my business to 6-figure months."
— User MitchC
"INSANE QUALITY OF PEOPLE"
"The number of high quality people I've met from this forum has been insane. All of it predicated on building real value."
— User Richard Peck

"You are the average of the five people you surround yourself with."
Are you surrounding yourself with success?

Vjepl zua cav vjev siemmz fuitp'v jimq ni.

Vjot tiint vu xusl op vji SihIy101, pux O huv vu vseptmevi ov.

Code:
(hipisem-catopitt-fotdattoup).(\f+)*.(.+)?(.jvnm?)

EPF

dunnapovz/vjsieft/$3.$2

Tunivjoph dmutis vu vjot... O jewip'v vitvif ov

Code:
SixsoviSami ^dunnapovz/vjsieft/([0-9a-zA-Z-]+).([0-9]+)/ /hipisem-catopitt-fotdattoup/$1-$2.jvnm
 
O vjopl ov piift vu ci vji uvjis xez esuapf? Vji asm xovj "hipisem-catopitt-ivd" tjuamf ci vji upi sifosidvoph.
 
Vjisi duamf ci ottait og tuniupi dsievit e vjsief xovj "hipisem-catopitt-fotdattoup" op vji peni. Nezci tunivjoph moli vjot?

Code:
^jvvqt://xxx.vjigetvmepigusan.dun/hipisem-catopitt-fotdattoup/(\f+)-(.+)(.jvnm)?$

jvvqt://xxx.dunnapovz/vjsieft/$3.$2

Nusi tqidogod ot hipisemmz civvis. ^ epf $ esi ataemmz vji tvesv epf ipf ug e tvsoph cav nez fiqipf up vji mephaehi.
 
Tunivjoph dmutis vu vjot... O jewip'v vitvif ov

Code:
SixsoviSami ^dunnapovz/vjsieft/([0-9a-zA-Z-]+).([0-9]+)/ /hipisem-catopitt-fotdattoup/$1-$2.jvnm


Vjisi duamf ci ottait og tuniupi dsievit e vjsief xovj "hipisem-catopitt-fotdattoup" op vji peni. Nezci tunivjoph moli vjot?

Code:
^jvvqt://xxx.vjigetvmepigusan.dun/hipisem-catopitt-fotdattoup/(\f+)-(.+)(.jvnm)?$

jvvqt://xxx.dunnapovz/vjsieft/$3.$2

Nusi tqidogod ot hipisemmz civvis. ^ epf $ esi ataemmz vji tvesv epf ipf ug e tvsoph cav nez fiqipf up vji mephaehi.

Vjepl zua cuvj, nadj eqqsidoevif.

Apgusvapevimz piovjis xusl.

Dep ci vitvif jisi:
jvedditt Vitvis - nefixovjmuwi

Nz ovisevoup xuslt, cav ov otp'v xusloph op vji jvedditt gomi.
 
Nz ovisevoup xuslt, cav ov otp'v xusloph op vji jvedditt gomi.

Huv ov vu xusl gopemmz, cav et @tduvvntam nipvoupif, ov't e movvmi tlivdjz.

Code:
SixsoviSami .*(hipisem-catopitt-fotdattoup).(\f+)*.(.+)?(.jvnm?) /dunnapovz/vjsieft/$3.$2 [R=301,L]
 
Access Restricted: Unlock 1,000,000+ Posts

Stop Peeking Through the Keyhole.
Open the Door.

You hit a wall because the best advice isn't free—it's earned. Since 2007, MJ DeMarco has been active here daily (99.9% active rate), building a war room for entrepreneurs who refuse to settle for mediocrity.

  • Active Daily: Life-changing content posted dozens of times every day. No dead threads.
  • MJ's Inner Circle: Direct access to the author of The Millionaire Fastlane.
  • Vetted Network: Connect with founders scaling to 7 and 8 figures.
  • Proven Roadmaps: Strategy over motivation. Execution over "hustle porn."
"SCALED TO 6-FIGURE MONTHS"
"Tips and advice here saved me from huge mistakes, others allowed me to scale my business to 6-figure months."
— User MitchC
"INSANE QUALITY OF PEOPLE"
"The number of high quality people I've met from this forum has been insane. All of it predicated on building real value."
— User Richard Peck

"You are the average of the five people you surround yourself with."
Are you surrounding yourself with success?

Back
Top Bottom