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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T20:51:45+00:00 2026-05-21T20:51:45+00:00

I need to use regex to search through an html file and replace href=pagename

  • 0

I need to use regex to search through an html file and replace href="pagename" with href="pages/pagename"

Also the href could be formatted like HREF = 'pagename'

I do not want to replace any hrefs that could be upper or lowercase that begin with http, ftp, mailto, javascript, #

I am using c# to develop this little app in.

  • 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-21T20:51:46+00:00Added an answer on May 21, 2026 at 8:51 pm

    HTML manipulation through Regex is not recommended since HTML is not a “regular language.” I’d highly recommend using the HTML Agility Pack instead. That gives you a DOM interface for HTML.

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

Sidebar

Related Questions

I need to use C# Regex to do a link rewrite for html pages
I don't usually use regular expressions, hence my question. I need a regex to
I need to use a datetime.strptime on the text which looks like follows. Some
I'd like to use the standard MongoDB ReST interface ( http://www.mongodb.org/display/DOCS/Http+Interface ) to search
Hi can someone please help me in writing this regex. I need to search
I need to use regex to get the Did you mean? portion of the
I need help in constructing RegEx for the search function on my website. I
I need to search a pretty large text file for a particular string. Its
I need to check file extension when search over a directory. if using re
Need to use own imaged markers instead built-in pins. I have several questions. 1.

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.