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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:11:09+00:00 2026-05-20T20:11:09+00:00

I am having some trouble on writing some strings I want to use in

  • 0

I am having some trouble on writing some strings I want to use in PHP syntax with preg_match_all.

All I managed to do correctly is to write <span style=""> to $regex_pattern = "/\<span style=\"color: red;\"\>(.*?)\<\/span\>/i"; but can’t do any further than that.

I mean I cant write correctly <h3 class=''>
or get the link between <h3 class=""><a href=" and </a>.
Please help me with the above and give me some examples if you want or any online tools for this.

Thanks in advance!

  • 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-20T20:11:09+00:00Added an answer on May 20, 2026 at 8:11 pm
    echo "<span style='color:red;'>Text</span>";
    

    Best way is to:

    if(condition){
    
    ?>
    
    <!-- HTML here -->
    
    <?
    
    }
    

    else

    \n  linefeed (LF or 0x0A (10) in ASCII)
    \r  carriage return (CR or 0x0D (13) in ASCII)
    \t  horizontal tab (HT or 0x09 (9) in ASCII)
    \\  backslash
    \$  dollar sign
    \"  double-quote
    \[0-7]{1,3}     the sequence of characters matching the regular expression is a character in octal notation
    \x[0-9A-Fa-f]{1,2}  the sequence of characters matching the regular expression is a character in hexadecimal notation
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having some trouble with writing some syntax. I want to echo this 'location_1'
Im having some trouble writing a getstring function, this is what I have so
I am having some trouble with writing classes in Arduino. Here is a class
I am having some trouble with writing a unit test that checks my custom
I'm new to linq and having trouble writing two simple queries. For some reason,
I'm having some trouble with this code. I am trying to write a function
I'm writing a news-app and I'm having some trouble with displaying a custom list.
I'm having some trouble writing a correct algorithm for centering a background image. Here's
I'm writing a recursive function in JS and having some trouble. Let's start with
OK, I'm having some trouble writing multiple lines to a text file. the program

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.