• Skip to primary navigation
  • Skip to content
  • Skip to footer
Technology, Trends and Leadership by Puneet Ghanshani
  • About
  • Applications
  • Open Source
  • Publications
  • Contact
    Puneet Ghanshani

    Puneet Ghanshani

    Chief Architect at Microsoft

    • Singapore
    • Twitter
    • LinkedIn

    Regex: To match C#, Java, VB.Net Comments

    less than 1 minute read

    Ever worked on removing comments from a C#, Java, VB and VB.Net code?

    Well, just adding 2 reg-ex to your library...

    Click Regexlib.com to navigate to the actual page

    C#/Java Matches: /* multi-line */ | // comment | /// XML Comment

    VB/VB.Net Matches: REM comment | 'comment | ''' XML comment

    Tags: CSharp

    Categories: CSharp, Visual Studio

    Updated: April 29, 2008

    Share on

    X Facebook LinkedIn Bluesky
    Previous Next

    You May Also Enjoy

    The Repository Becomes the Process: Rebuilding SDLC for the AI Era

    37 minute read

    Software engineering has never really been about writing code. It has been about preserving institutional memory, what a team knows about why a system works ...

    Prompts, Skills, Agents

    9 minute read

    A few weeks ago, I was in a conversation with a friend about moving from Gen AI to agentic systems. We spent most of it on the architectural question: what a...

    The Recovery Instinct That Creates a Second Problem

    9 minute read

    Years ago, I have cleared my calendar for a failing project and called it a recovery plan. It felt like the right call for about two weeks. Then the team sto...

    Why AI Transformations Lose Momentum

    3 minute read

    Most AI transformations are not failing on the technical side. They are failing because new models get deployed in weeks, while new behaviours take months. T...

    • Follow:
    • Twitter
    • GitHub
    • LinkedIn
    • Feed
    © 2026 Puneet Ghanshani. Powered by Jekyll & Minimal Mistakes.