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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:32:40+00:00 2026-06-17T16:32:40+00:00

I have problem, can help me? I have text and I want to replace

  • 0

I have problem, can help me?
I have text and I want to replace it from ” to “.

<span>new var[128]; format(var, sizeof(var), "something %s %f", "Stuneris", 1589.0587); SendClientMessage(playerid, 0xFFFFFFFF, var);</span>

And I want "something %s %f" and "Stuneris" replace to <span class="numb">"something %s %f"</span> and <span class="numb">"Stuneris"</span>

And other problem is to replace HEX codes from 0xFFFFFFFF to <span class="numb">0xFFFFFFFF</span>.

What I need to do?

  • 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-17T16:32:41+00:00Added an answer on June 17, 2026 at 4:32 pm

    Replacing the HEX codes is easy:

    $text = preg_replace('/(0x[0-9a-f]+)/i','<span class="numb">$1</span>',$text);
    

    Replacing the strings within quotes is a bit more tricky. The main issue is to inlcude "something %s %f", but exclude ", " (which separates the quoted strings, but will also look like a quoted string). If you can be sure there will never be a comma in any of the strings, you’d use:

    $text = preg_replace('/("[^",]+")/i','<span class="numb">$1</span>',$text);
    

    If you must allow for a comma, this will exclude all strings that start with a comma:

    $text = preg_replace('/("(?!,)[^"]+")/i','<span class="numb">$1</span>',$text);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Dear everybody who can help, I have this PHP > MongoDB problem, I want
can anyone help, i have problem doing a sort, I thought i had it
I have a problem with preg_match_all that maybe you can help. I have a
I have a problem with a UIView, hope you can help me. I have
i have very serious problem if any tech expert can help...thank you in advance..
can anyone help? I have a problem aligning rounded corners in IE6/7. Basically everything
Perhaps any of you can help me with this anoying problem. I have long
I hope some of you guys can help me with this problem.... I have
i have a problem so hope you guys can help! I have a string
I have the following problem, maybe someone can help me (or explain, where my

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.