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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:21:55+00:00 2026-06-01T07:21:55+00:00

I have not written regular expressions before and my knowledge is woefully inadequate. I

  • 0

I have not written regular expressions before and my knowledge is woefully inadequate. I am hoping the experts here would be able to help me with a regular expression that I could use in C# to remove the markup tags only.

The markup has one the following opening tags: <AI>! or <AH>! or <AG>! and is ended with another !

Example: the quick brown <AI>!fox jumps! over the lazy dog!

After markup removed should be: the quick brown fox jumps over the lazy dog!

Code Snippet:

    NOT MORE THAN 85 % OF H<AH>!3!BO<AH>!3! CALCULATED ON THE DRY WEIGHT
- Uranium ores and pitchblende, and concentrates thereof, with a uranium content of more than 5 % by weight (<AI>!Euratom!)
- Monazite; urano-thorianite and other thorium ores and concentrates, with a thorium content of more than 20 % by weight (<AI>!Euratom!)
- - - -   -94% or more, but not more than 98.5% of a-Al<AH>!2!O<AH>!3!  -2% (+/-1.5%) of magnesium spinel,  -1% (+/-0.6%) of yttrium oxide and   -2% (+/-1.2%) of each lanthanum oxide and neodymium oxide  with less than 50% of the total weight having a particle size of more than 10mm
- Activated alumina with a specific surface area of at least 350 m<AG>!2!g
IRON OXIDES AND HYDROXIDES; EARTH COLOURS CONTAINING 70 % OR MORE BY WEIGHT OF COMBINED IRON EVALUATED AS FE<AH>!2!O<AH>!3!:
- <AI>!o!-Xylene
- <AI>!m!-Xylene
- <AI>!p!-Xylene
- - - 1,6,7,8,9,14,15,16,17,18,18-Dodecachloropentcyclo[12.2.1.1<AG>!6,9!.0<AG>!2,13!.0<AG>!5,10!]octadeca-7,15-diene, (CAS RN 13560-89-9)
- Chlorobenzene, <AI>!o!-dichlorobenzene and <AI>!p!-dichlorobenzene
- - - Di- or tetrachlorotricyclo[8.2.2.2<AG>!4,7!]xadeca-1(12),4,6,10,13,15-hexaene, mixed isomers
- Butan-1-ol (<AI>!n!-butyl alcohol)
- - 2-Methylpropan-2-ol (<AI>!tert!-butyl alcohol)
- <AI>!n!-Butyl acetate
- <AI>!O!-Acetylsalicylic acid, its salts and esters
- - <AI>!O!-Acetylsalicylic acid (CAS RN 50-78-2)
- 1-Naphthylamine (<AH>!alpha!-naphthylamine), 2-naphthylamine (<AI>!beta!-naphthylamine) and their derivatives; salts thereof
- <AI>!o!-, <AG>!m!-, <AH>!p!-Phenylenediamine, diaminotoluenes, and their derivatives; salts thereof:
- - <AI>!o!-, <AI>!m!-, <AI>!p!-Phenylenediamine, diaminotoluenes and their halogenated, sulphonated, nitrated and nitrosated derivatives; salts thereof:
- - Indole, 3-methylindole (skatole), 6-allyl-6,7-dihydro-5<AI>!H!-dibenz[<AI>!c,e!] azepinne (azapetine), phenindamine (INN) and their salts; imipramine hydrochloride (INNM)
- Vitamin B<AH>!1! and its derivatives
- Vitamin B<AH>!2! and its derivatives

Thank you 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-06-01T07:21:56+00:00Added an answer on June 1, 2026 at 7:21 am

    The regex to use will look for A followed by one of [GHI] enclosed in <>!. After it finds that, it will do a lazy search (denoted by the ?) of one or more(+) anything(.) followed by an exclamation mark. It’s lazy so it doesn’t seek until it finds the last exclamation in the sample, it will instead stop at the first exclamation and replace what it finds. It will then use grouping (the parenthesis in the pattern) to store the value contained within your tags, and will use it when replacing ($1 denotes first group).

    var r = new Regex("<A[GHI]>!(.+?)!");
    var actual = r.Replace(xml, "$1");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Excel VBA Script I've written with help, I am not a
I'm maintaining an in-house ORM written in C#, and it currently does not have
I'm using some not optimal code written by me... :-| I have following code:
I have written a C# Windows Forms application, not a service (it is only
I have written the code for AmortizationLoanSchedule in Swing but the look is not
I have three arrays (it's written in C but that is not important, it
I have written provider part in java. Notification is sent to the APNs. Not
I have written the following code. But it is removing only &nbsp; not <br>
I have written a very very very simple!! script in php. header redirection not
I have written regular expression which converts text links into clickable link. The code

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.