Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8590109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:13:09+00:00 2026-06-11T23:13:09+00:00

Alright, so I have a link using my custom syntax. This is part of

  • 0

Alright, so I have a link using my custom syntax. This is part of my parser (sans the XSS scrubber part), and it’s the problematic one that I’ve isolated one of the remaining bugs in. For some reason, the URI http://ur.i is getting truncated to merely "i".

Anyone who knows why gets a pony.

var str = "[inner -> http://ur.i]";

str = str.replace(/\[([^\]]+?)\s*(\||->)\s*((?!->)[^\]])+]/g, function(m, iH, separator, hr){
  console.log('hr: '); console.log(hr);
  return '<a class="'+ (separator.match(/-&gt;/) ? 'adlns-btn' : 'adlns-link') +'" href="'+ hr +'">' +
            iH +
         '</a>';
});

console.log(str);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T23:13:10+00:00Added an answer on June 11, 2026 at 11:13 pm

    The + quantifier should be inside the parentheses, not outside:

    /\[([^\]]+?)\s*(\||-&gt;)\s*((?!-&gt;)[^\]]+)]/g
    

    This solves the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Alright, so I have a php that responds to a GET HTTP request; this
Alright so I have no idea how to even begin doing this But basically
Alright so I have a task, that I have to let the client try
Alright, so I have this collision detection code, and I'm trying to push the
Alright, I have this program to sparse code in Newick Format, which extracts both
Alright, I have my urls set up to rewrite news_item.php?id=1 to blog/1/Title-of-post. This works
I was happily coding, thinking that everything was alright, until.. libtool: link: g++ -g
Alright I have two problems. I'm using AVAudioPlayer to play a simple audio file
Alright, I presented this question on the MSDN forums but have yet to receive
Alright, so this is getting very very annoying. I have an unmanaged VC 2010

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.