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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:12:36+00:00 2026-05-23T17:12:36+00:00

Expert I swear I surf a lot of regular expression stuff to study but

  • 0

Expert

I swear I surf a lot of regular expression stuff to study but I find regular expression topic is too difficult to me understand. Any good suggestion for me?

Anyone can explain to me why this <p[^>]*> can simply remove the start <p> or <p attr="">?
And what could I do, if I want make it from

<div style="float: left; width: 350px; border: 1px solid #000000;" class="star1">abcdk</div>

to this

<div class="star1">abcdk</div>

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-23T17:12:36+00:00Added an answer on May 23, 2026 at 5:12 pm

    Suggestion: Play around with a regex tester to get the hang of what matches what.

    Jason’s explanation was good, but maybe not in-depth enough for you if you’re just starting out with regexes. Let’s take <p[^>]*> a piece at a time:

    • < has no special meaning to regex engines, so it means it just matches a single <
    • p is the same: match a single p
    • [ is a special character. Square braces in regex mean “any of these”. For instance, the regex [abc] would match any single character that is ‘a’, ‘b’, or ‘c’.
    • ^ is a special character with two possible meanings. When inside of square brackets, like it is here, it’s a simple negation. Whereas [abc] would match any single character mentioned, [^abc] would match any single character not mentioned.
    • > has no special meaning: just match a single >
    • ] should be obvious to you by now: it closes the opening [
    • * is a special character that says match 0 or more of what came before it; that means it could match nothing, or it could match a huge amount of stuff, as long as it all matches what comes before the *.
    • > still no special meaning, like earlier

    So we can break <p[^>]*> into three pieces, and we can say that it matches any series of characters:

    • <p: that starts with a literal <p,
    • [^>]*: which is followed by 0 or more characters that are not a >,
    • >: and which ends with a literal >.

    Oh, and http://www.regular-expressions.info is one of the best regex guides I’ve ever found online.

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

Sidebar

Related Questions

I'm no expert on Regex. I'm trying to create a regular expression that will
I'm no expert, I can't understand the theory in details but it is said
I am not an expert but I am trying to write .NET regex expression
I'm no crypto expert, but as I understand it, 3DES is a symmetric encryption
Can any expert here please point me to some valid walkthrough on how to
I'm no expert in parallel programming. But I'm curious if I can use them
I am not an expert in Git, but I have seen this done before
I'm not very expert on how processors work, but one might imagine that it
I'm a C++ expert, but not at all for C#. I created a Dictionary<string,
Not a regex expert, but I know enough to be dangerous, need some help

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.