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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:39:15+00:00 2026-05-29T23:39:15+00:00

How to use php regular expression to get the position of date string in

  • 0

How to use php regular expression to get the position of date string in the following sample?

For example, I want know the position of “December 31, 2011” or “December 31 2011”. Date format is “month day, year” or “month day year”

<TR>
<TD VALIGN="top" ALIGN="center"><FONT STYLE="font-family:Times New Roman" SIZE="2"><B>December 31, 2011</B></FONT></TD></TR>
</TABLE> <P STYLE="margin-top:0px;margin-bottom:0px" ALIGN="center"><FONT STYLE="font-family:Times New Roman" SIZE="1"><B>(Date of Event Which Requires Filing of this Statement) </B></FONT></P>
<P STYLE="font-size:12px;margin-top:0px;margin-bottom:0px">&nbsp;</P><center> <P STYLE="line-height:6px;margin-top:0px;margin-bottom:2px;border-bottom:1pt solid #000000;width:21%">&nbsp;</P></center> <P STYLE="margin-top:12px;margin-bottom:0px"><FONT
STYLE="font-family:Times New Roman" SIZE="2"><B>Check the appropriate box to designate the rule pursuant to which this Schedule is filed: </B></FONT></P> <P STYLE="margin-top:12px;margin-bottom:0px; margin-left:8%"><FONT
STYLE="font-family:Times New Roman" SIZE="2"><B></B><FONT STYLE="FONT-FAMILY:WINGDINGS">&#120;</FONT><B></B><B> Rule 13d-1 (b) </B></FONT></P> <P STYLE="margin-top:12px;margin-bottom:0px; margin-left:8%"><FONT
STYLE="font-family:Times New Roman" SIZE="2"><B></B><FONT STYLE="FONT-FAMILY:WINGDINGS">&#168;</FONT><B></B><B> Rule 13d-1 (c) </B></FONT></P> <P STYLE="margin-top:12px;margin-bottom:0px; margin-left:8%"><FONT
STYLE="font-family:Times New Roman" SIZE="2"><B></B><FONT STYLE="FONT-FAMILY:WINGDINGS">&#168;</FONT><B></B><B> Rule 13d-1 (d) </B></FONT></P> <P STYLE="font-size:12px;margin-top:0px;margin-bottom:0px">&nbsp;</P>
<TABLE STYLE="BORDER-COLLAPSE:COLLAPSE" BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
<TR>
  • 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-29T23:39:17+00:00Added an answer on May 29, 2026 at 11:39 pm
    <?php
    $str = '<TR>
    <TD VALIGN="top" ALIGN="center"><FONT STYLE="font-family:Times New Roman" SIZE="2"><B>December 31, 2011</B></FONT></TD></TR>
    </TABLE> <P STYLE="margin-top:0px;margin-bottom:0px" ALIGN="center"><FONT STYLE="font-family:Times New Roman" SIZE="1"><B>(Date of Event Which Requires Filing of this Statement) </B></FONT></P>
    <P STYLE="font-size:12px;margin-top:0px;margin-bottom:0px">&nbsp;</P><center> <P STYLE="line-height:6px;margin-top:0px;margin-bottom:2px;border-bottom:1pt solid #000000;width:21%">&nbsp;</P></center> <P STYLE="margin-top:12px;margin-bottom:0px"><FONT
    STYLE="font-family:Times New Roman" SIZE="2"><B>Check the appropriate box to designate the rule pursuant to which this Schedule is filed: </B></FONT></P> <P STYLE="margin-top:12px;margin-bottom:0px; margin-left:8%"><FONT
    STYLE="font-family:Times New Roman" SIZE="2"><B></B><FONT STYLE="FONT-FAMILY:WINGDINGS">&#120;</FONT><B></B><B> Rule 13d-1 (b) </B></FONT></P> <P STYLE="margin-top:12px;margin-bottom:0px; margin-left:8%"><FONT
    STYLE="font-family:Times New Roman" SIZE="2"><B></B><FONT STYLE="FONT-FAMILY:WINGDINGS">&#168;</FONT><B></B><B> Rule 13d-1 (c) </B></FONT></P> <P STYLE="margin-top:12px;margin-bottom:0px; margin-left:8%"><FONT
    STYLE="font-family:Times New Roman" SIZE="2"><B></B><FONT STYLE="FONT-FAMILY:WINGDINGS">&#168;</FONT><B></B><B> Rule 13d-1 (d) </B></FONT></P> <P STYLE="font-size:12px;margin-top:0px;margin-bottom:0px">&nbsp;</P>
    <TABLE STYLE="BORDER-COLLAPSE:COLLAPSE" BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
    <TR>';
    
    $matches = array();
    preg_match('/(\w+ \d{1,2},? \d{4})/', $str, $matches); // search for date
    
    $position = strpos($str, $matches[0]);  // Find position
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use the following regular expression to check whether a string
How can I use a regular expression in the substr() PHP function to get
Is it possible to use a regular expression with the php function array_key_exists() ?
Hi have some forms that I want to use some basic php validation (regular
I want to use PHP to replace javascript functions in HTML documents. For example:
I have a little problem with my regular expression, that I use in PHP.
I want to use PHP to check, if string stored in $myoutput variable contains
What regular expression can I use in PHP to remove all punctuation from the
I need to use the following regular expression to validate some Asian characters $regexp
I want to use php in console mode and create an environment to test

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.