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

  • SEARCH
  • Home
  • 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 3361122
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T03:06:53+00:00 2026-05-18T03:06:53+00:00

I am forced into parsing some HTML on the client side (and yes this

  • 0

I am forced into parsing some HTML on the client side (and yes this really is the only option in this case), but I am having a bit of trouble in Firefox only with the following:

 $('#Extensions').load('/advanced/admin/config.php?type=setup&display=extensions #container li'
   ,function(){
    $('li').each(function(){

     var liRow=$(this).html();
     var reExten=/([0-9]+)/g;
     var extension = liRow.match(reExten)[0]

     var reName=/>([a-zA-z0-9\s]+ *)/g;
     var matchName = reName.exec(liRow);
     var name = matchName[1]

    });
   }
  );

The HTML that is being returned from load is something along the lines of:

<a href="file.php?type=A&amp;extension=1001">Test Extension &lt;1001&gt;</a>

The regex seems to work fine if you copy and paste it into the firefox JS console and the code as a whole works fine in internet explorer 7/8/9.

So here’s the tricky bit. In firefox matchName is null on every other iteration of .each. Example output from Firebug:

LOG: Matches: The Boss
LOG: data: <A href="file.php?type=A&amp;extension=13">The Boss &lt;13&gt;</A>
LOG: regex: />([a-zA-z0-9\s]+ *)/g;
LOG: Matches: Test Extension
LOG: data: <A href="file.php?type=A&amp;extension=1001">Test Extension &lt;1001&gt;</A>
LOG: regex: />([a-zA-z0-9\s]+ *)/g;
LOG: Matches: John Smith
LOG: data: <A href="file.php?type=A&amp;extension=3801">John Smtih&lt;3801&gt;</A>
LOG: regex: />([a-zA-z0-9\s]+ *)/g;
LOG: Matches: Guy Smiley
LOG: data: <A href="file.php?type=A&amp;extension=3802">Guy Smiley &lt;3802&gt;</A>
LOG: regex: />([a-zA-z0-9\s]+ *)/g;
LOG: Matches: 3803
LOG: data: <A href="file.php?type=A&amp;extension=3803">Jane Doe &lt;3803&gt;</A>
LOG: regex: /extdisplay=([0-9]+)/g
LOG: Matches: 3804
LOG: data: <A href="file.php?type=A&amp;extension=3804">John Doe &lt;3804&gt;</A>
LOG: regex: />([a-zA-z0-9\s]+ *)/g;

Lastly, this only seems to happen when using re.exec and never on str.match(re). I’m at a total loss and have been starting at this for an hour now so I hope the question makes some kind of sense!

  • 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-05-18T03:06:53+00:00Added an answer on May 18, 2026 at 3:06 am

    This is probably not the final answer but its an easy thing to check. I ran this through JSLint and got these errors. Occasionally things like this can account for browser discrepancies.

    Problem at line 1 character 23: Bad line breaking before ','.
    
    $('#Extensions').load('/advanced/admin/config.php?type=setup&display=extensio...
    
    Problem at line 7 character 45: Missing semicolon.
    
    var extension = liRow.match(reExten)[0]
    
    Problem at line 11 character 29: Missing semicolon.
    
    var name = matchName[1]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am parsing a string to convert it into a DateTime. I am getting
This is a somewhat subjective question, but I'd like to hear the pros/cons for
I have a jQuery DataTable configured for server-side processing against an ASP.NET MVC server.
I have thousands of SGML documents, some well-formed, some not so well-formed. I need
I am running into a peculiar problem when I am trying to invoke h:inputText
I'm trying to parse a simple JSON file. I'm very new to javascript, JSON,
I'm trying to parse a simple JSON file. I'm very new to javascript, JSON,
I am confronted with the double bind. On the one hand, for one of
I'm trying to figure out how to do a left-associative expression where recursive (not-enclosed

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.