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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:34:26+00:00 2026-06-17T11:34:26+00:00

now my problem is replace all line from # and from /* to */(for

  • 0

now my problem is replace all line from # and from /* to */(for comments).
I have code:

<span>#include <a_samp><br />#define NUMBER 5<br />/* Long Comment */ new var[128]; format(var, sizeof(var), "kažkas %s %f", "Stuneris", 1589.0587); SendClientMessage(playerid, 0xFFFFFFFF, var);</span>

and I want to replace from # all line to <h1>#...(line)</h1> and from /* to */ to <h3>/* Long Comment */</h3>

I tired preg_replace('/(/*(?!,)[^"]+*/)/i', '<h3>$1</h3>', $text);, but it show warning Warning: preg_replace(): Unknown modifier '*' in C:\xampp\htdocs\pawn.php on line 18

I know, I need preg_replace, but how combination of search?

  • 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-17T11:34:26+00:00Added an answer on June 17, 2026 at 11:34 am

    You’ll need to escape the special characters in you regexp

    preg_replace('/(\/\*(?!,)[^"]+\*\/)/i', '<h3>$1</h3>', $text);
    

    DEMO

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

Sidebar

Related Questions

I have a dynamic list code that works just fine. My only problem now
Well i have a web page hosted in a IIS 7.0 now the problem
So what my code looks like.. Now the problem is that Everything is fine
I have a general IO question. I was trying to replace a single line
I am solving the Erdos number problem from the programming challenges in JAVA. The
I'm trying to solve this problem for a week now and I have tested
I've been searching for an answer to this problem all day long. I'm creating
I have a problem in sorting my line numbers. My codes output like this
i m using jQuery tablsorter plugin, it's working perfect,but now problem is ... i
Right now the problem is that the first time when I click the image,

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.