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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:16:44+00:00 2026-05-13T09:16:44+00:00

On a phpBB forum, memberlist.php lists all the members of the board with the

  • 0

On a phpBB forum, memberlist.php lists all the members of the board with the following HTML:

<a href="profile.php?mode=viewprofile&amp;u=4">Username</a>

Where u=4 is the UserID of the user, and Username is obviously their username.

There are probably 50-100 peices of HTML like this and I would like to match them all, so I was going to use preg_match_all.

This is what I got:

preg_match_all('/<a href="profile\.php?mode=viewprofile&amp;u=/d">(.*?)</a>/', $page, $usrname, PREG_PATTERN_ORDER);

But it returns this error:

Warning: preg_match_all() [function.preg-match-all]: Unknown modifier 'd' in C:\xampp\htdocs\index.php on line 38

Could anyone tell me the regex to use in the preg_match_all function to match the usernames? Bearing in mind the u=4 part of the link will change 🙂

Cheers.

  • 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-13T09:16:44+00:00Added an answer on May 13, 2026 at 9:16 am

    You should use \d instead of /d

    /d is an attempt to use a modifier (such as /i for case insensitivity)

    \d is a character class meaning the numbers 0-9.

    This should work:

    preg_match_all('/<a href="profile\.php\?mode=viewprofile&amp;u=\d+">(.*?)<\/a>/', $page, $usrname, PREG_PATTERN_ORDER);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok, please look at my problem: http://phone7forum.com/viewforum.php?f=2 http://phone7forum.com/viewtopic.php?f=2&t=4 I've been editing a phpBB forum
I've been tasked with connecting a phpbb forum to an existing Magento database. The
How can I let my users to log into a phpBB forum by entering
I see in PHPBB they use conditional statements inside their HTML, or XHTML; if
I want to crawl some data out of a phpBB forum i'm a member
What is the best way to integrate a legacy phpBB forum into a new
I want to write an app that parse particular threas on a phpbb forum.
phpBB stores forum post texts in a strange way (like: [BLOB - 115 B]),
I have a forum using phpBB. Now i would like to do something like
I'm trying to make an autologin bot for phpbb 3.0.10 with curl. The forum

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.