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 8190509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:40:25+00:00 2026-06-07T03:40:25+00:00

var rinlinejQuery = / jQuery\d+=(?:\d+|null)/g, html: function( value ) { if ( value ===

  • 0
var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,

html: function( value ) {
        if ( value === undefined ) {
            return this[0] && this[0].nodeType === 1 ?
                this[0].innerHTML.replace(rinlinejQuery, "") :
                null;

        // See if we can take a shortcut and just use innerHTML
        }

Does it match code such as jQuery11="11"?

And why is it needed in the html() function?

  • 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-07T03:40:28+00:00Added an answer on June 7, 2026 at 3:40 am

    OK, so first off we have jQuery\d+ which is just ‘jQuery’ followed by one or more numerical digits (\d is the same as [01-9]).

    Then we have =" which are just literals here, so we’re matching anything that has ‘jQuery’, then at least one number, then ‘=”‘.

    Next, the (...|...) construct is an Or, so it matches either the expression before the vertical bar |, or the expression after it. In this case, those expressions are \d+ and null, so our query matches any string that consists of ‘jQuery’, at least one number, ‘=”‘, and then either at least one number, or the string ‘null’. This is followed by a " literal.

    The only thing left as part of the expression itself is the ?: found just after the opening parenthesis. Normally, anything in parentheses in a regular expression gets saved, so that you can refer to it in the replacement string with $n where n is a number referring to which match you’re referring to. The ?: to start the parenthetical in this case prevents that from happening, so that the parentheses can be used to group the options for the Or without wasting time or memory remembering the value of the match.

    Finally, regular expressions are enclosed in forward slashes /, and this one has the g switch, which indicates a global search.

    So what we have is ‘jQuery’, one or more numbers, ‘=”‘, one or more numbers or ‘null’, ‘”‘.

    To answer your second question, yes, this pattern would match that string.

    I’m afraid I do not know why jQuery’s html function needed to remove that particular string from this[0].innerHTML (which is what the replace function is doing), but based on the comment it looks like they were using the string to test whether or not innerHTML was valid and functional (which it is not on all browsers)?

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

Sidebar

Related Questions

var conversations = new Array(); jQuery('.CChatWindow').each(function(){ if (jQuery(this).is(:visible) && jQuery(this).attr(data-conversationid) != 0) { alert(jQuery(this).attr(data-conversationid));
var foo = { p1: function(){ return this.p2; }, p2: function(){ console.log('i am foo.p2');
var UI$Contract$ddlForm_change = function() { //'this' is currently the drop down that fires the
var UsersMenu = function(){ this.returnUsers = []; this.retrieve = function(posts){ var temp = [];
var h=0; var w=0; $(.extend).hover(function() { //alert(h); $(this).css({'z-index' : '999' }); $(this).addClass(hover).filter(:not(:animated)).stop() .animate({ marginTop:
var chart; var d = new Array(); function click() { d = document.getElementById('graph:hi').value; alert(d);
var positions = [ 00, 01, 02, 03, 04, 05 ]; jQuery.each( positions, function(players)
var plugin = { Init: function() { this.UpdateUI(); if (this.Status() == 1) { ...
var MyObj = function(h,w){ this.height = h; this.width = w; } I would like
var AppPatientsList = JSON.parse(JSON RESPONSE); var AppPatientsListSort = AppPatientsList.sort(function(a,b){ return a.firstName.toLowerCase() <b.firstName.toLowerCase() ? -1

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.