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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:05:14+00:00 2026-06-04T22:05:14+00:00

I have this code down here and I need to return the args.Content (my

  • 0

I have this code down here and I need to return the args.Content (my input data) with only digits and deleteing the rest of characteres. I’ve been trying many things with regular expressions but it didnt work for me. I have almost no idea of C# and I really need the help from the programers of this website.

using System;
using VisualWebRipper.Internal.SimpleHtmlParser;
using VisualWebRipper;
public class Script
{

    public static string TransformContent(WrContentTransformationArguments args)
    {
        try
        {
            //Place your transformation code here.
            //This example just returns the input data
            return args.Content;
        }
        catch(Exception exp)
        {
            //Place error handling here
            args.WriteDebug("Custom script error: " + exp.Message);
            return "Custom script error";
        }
    }
}

Hope you can help

  • 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-04T22:05:16+00:00Added an answer on June 4, 2026 at 10:05 pm

    Just delete anything that is not a digit. There is a predefined character class for digits: \d, the negation is \D.

    So you regex is simply:

    \D+
    

    In your C# code it would be something like

    return Regex.Replace(args.Content, @"\D+", "");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code which can display drop down in div tag of html.
I have managed to crunch down a several line code to this For Each
I have created this function GetSubName that I need to return the name that
Ok I have some code that boils down to a pattern like this class
have this code: template<typename T, template<typename, typename> class OuterCont, template<typename, typename> class InnerCont, class
i have this code local strs = my dog print (string.gsub( strs , ,%20))
I have this code : h1, h2, h3, h4{ color: red; } .message_rouge h1,
I have this code: std::string name = kingfisher; char node_name[name.size()+1]; strcpy(node_name,name.c_str()); node_name[name.size()] = '\0';
I have this code: level = {0, 0, 0, 0, 1, 0, 0, 0,
I have this code: public function getRecurringEventsByGrouped($grouped){ $query = SELECT * FROM `event` AS

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.