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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:56:57+00:00 2026-06-09T11:56:57+00:00

The variable $page includes a webpage (full HTML file), but I want to filter

  • 0

The variable $page includes a webpage (full HTML file), but I want to filter that file on this line:

<a href="http://[website]/[folder]/

And I want that the 5 characters after parsed in a string.

But that strings is multiple times inside $page, so the numbers has to be stored in an array too.

So if a match is found with <a href="http://[website]/[folder]/23455, how do I get the ‘23455’ into $nums[0]

And if another match is found with <a href="http://[website]/[folder]/12345, the ‘12345’ will be put into $nums[1]

  • 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-09T11:56:59+00:00Added an answer on June 9, 2026 at 11:56 am

    Take a look at http://net.tutsplus.com/tutorials/other/8-regular-expressions-you-should-know/ maybe this regular expression works for you:

    /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/ 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a variable $cartTotal in cart.php page i want to use that same
I have a page that includes/embeds a file that contains a number of functions.
I have a html component that includes some javascript. The component is a file
I am doing this currently, class Page { // variable to hold DBC class
If i declared a variable as public in a web page, does this variable
So, I've got this aspx page which includes 4 javascipt files like so: <script
I have an html/css page that is supposed to use an html table layout
I have an includes.php page that I load at the start of every page
I really have read the other articles that cover this subject. But I seem
I've got a ColdFusion page that I want to include some admin level jQuery

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.