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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T05:40:49+00:00 2026-05-30T05:40:49+00:00

I have a pretty easy (imo) Regular expression which doesn’ translate to C#. RegExr

  • 0

I have a pretty easy (imo) Regular expression which doesn’ translate to C#. RegExr says it works, however testing it in C# doesn’t work… Do I need to change anything to make it work in C#?

RegEx:

/https://subdomain[.1]domain[.1]com/(.*)(ashx|axd)/g

Replace:

http://subdomain.domain.com/$1$2

Input string:

<script src="https://subdomain.domain.com/ScriptResource.axd?d=SQ032obz8ZDKgHbn6XZ3X4xN0iWznAgAxgrdjOtFjVj-yUo-Lk-c2r4ciOs2uasdfjiemr4ciOs2uaGYfeYrYGiemnAQT9UzGoQVKs_JPL8l7TA1LjPYKexOcr4ciOs2uar4ciOs2uaHgpZf-tDxkb_le2NhBN0&amp;t=ffffffffb868b5f4" 
type="text/javascript"></script><script type="text/javascript">
//<![CDATA[
Sys.Application.initialize();
//]]>
</script>
  • 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-30T05:40:50+00:00Added an answer on May 30, 2026 at 5:40 am

    Your regex shouldnt contain / and /g. And instead [.1] write .

    As I suspect you only want to change https into http you can just do that:

    s = s.Replace("https:", "http:");
    

    In case you want to replace the domain you can do that with regex:

      s = Regex.Replace(s, "https://[^/]+", "http://yourreplaced.domain.com", RegexOptions.Multiline);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

practising some python, which is a pretty easy language to grab up. I have
I have this code which is pretty easy, it adds an image to the
I have a feeling that this query is pretty easy to construct, I just
I'm pretty sure it's easy but I can't seem to find it. I have
I have a text file that is pretty long. Any easy way to undo
I have a pretty easy question. (using C) In a sentence such as In
It's pretty easy to style a text input and have it work right in
I'm starting with WPF and I have this pretty easy question: I have a
I have made blog using ruby on rails, and it's pretty easy. What i
My problem is pretty easy to understand. I have a JSON object (see 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.