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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:09:42+00:00 2026-06-15T21:09:42+00:00

i just wanna ask what this symbol .*? means in php. here is the

  • 0

i just wanna ask what this symbol .*? means in php.
here is the sample code:

    function parse($html) {
    //echo "Find table(id=weekdays)..\n";
    $pattern = "/(<table.*?id=\"weekdays\".*)/ims";
    //$pattern = "/(<div.*?id=\"flexBox_flex_calendar_mainCal\".*)/ims";
    //echo $pattern."\n";
    $match = array();
    //$html = str_replace("\r", "", $html);
    //$html = str_replace("\n", "", $html);
    if (preg_match($pattern, $html, $match) > 0) {
        //print_r($match);
        //echo $match[1];
        //echo count($match);
        $this->parseTable($match[1]);
    } else {
        echo "Error: no match calendar data(table id=weekdays) found, maybe fx.com change its site html'!\n";
    }
}

I am maintaining a website that has the function to extract the table values from another/an external website then parse it to insert on our database..

I have to change the value of $pattern but i cant since i didn’t know what does that symbols mean..

Thank you so much for the help..

  • 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-15T21:09:43+00:00Added an answer on June 15, 2026 at 9:09 pm

    That is a wildcard character in a regular expression.

    (<table.*?id=\"weekdays\".*)

    /./s means ANY character

    * means 0 or more times

    So /.*/s means “match any character 0 or more times”

    STRING : hello , now this is some garbage , world. And this is a long sentence which ends in world

    hello.*world will match this WHOLE string.

    See example : http://regexr.com?334em

    And /.*?/s means “match any character 0 or more times, but the non greedy match i.e. The earliest match is returned (here: a zero-length string).

    /hello.*?world/s will match only hello , now this is some garbage , world as it is the smallest non-greedy match.

    See same example with difference :
    http://regexr.com?334ep

    ims are flags i , m and s

    You can read about them here: PHP: Possible modifiers in regex patternsDocs

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

Sidebar

Related Questions

Just wanna ask about this php Basic access authentication, is there anyway to reduce
I probably missed something but just wanna ask.. I found this code in the
I'm using code-igniter to develop my php application. I just wanna ask if there
I just wanna find out if there's a way I could minimize code clutter
Just wanna ask this question. Can I use detailTextLabel in a Custom Cell? I
Just wanna ask anyone here knows why when i put a placeholder in my
I just wanna ask this very trivial question, I do not know if this
Just wanna ask what is the code to upload image to database is it
Just wanna ask u guys here, I have a drop down list box which
I just wanna ask if there's a way where I could put an object

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.