You ever stare at a regex match and try to figure out what 'group[3]' actually means? Yeah, same. Named capture groups let you label parts of your pattern so 'match.Groups["date"]' actually tells you something. Pair that with 'Regex.IsMatch' for quick yes/no checks, and you suddenly feel like you know what you are doing. Introduced back in .NET 1.1, regex named groups have been quietly saving developers from their own cryptic patterns for over two decades. .NET 7 went further with source-generated regex - compile-time validation so you break at build, not at 2am. It is like spell-check, but for your paranoia. --- var pattern = @"(?<date>\d{4}-\d{2}-\d{2}) (?<level>\w+)"; var match = Regex.Match(logLine, pattern); Console.WriteLine(match.Groups["date"].Value); --- Run it, break it, learn it: https://lnkd.in/e-_w4N-f #dotnet #csharp #programming #regex
Mastering Regex Named Groups in .NET
More Relevant Posts
-
Agent Replay Debugger update - now with real agent reasoning Last week I posted v1 of agent-replay-debugger. Since then I've shipped three updates worth sharing. What changed: The original version only showed lifecycle events - pipeline_started, step_passed, step_failed. Useful for status, useless for understanding why the agent did what it did. Now the viewer parses the full transcript: every reasoning block where the agent explains its thinking ("Let me check the existing component structure..."), every tool call with its target (Read src/components/rewards.tsx, Edit src/lib/api.ts, Bash npm test), and the actual user messages that triggered each chain of decisions. A real session now surfaces 56 reasoning events and 138 tool calls - the complete decision chain, not just the outcome. New viewer features: - Consecutive reasoning events collapse into groups (click to expand) so you're not scrolling past 50 "I'll now..." blocks - DAG nodes show duration and tool count, and clicking one filters the timeline to just that span - Automatic PII redaction: emails, API keys, JWTs, tokens, user paths - all scrubbed before any data reaches the viewer Second adapter: Claude Code. Point ARD at any Claude Code session .jsonl and get the full interactive timeline. Two frameworks supported now, more coming. Still zero runtime dependencies. Still one command: ard view ./session.jsonl Try the live demo (real session, auto-scrubbed): https://lnkd.in/gRFB7uWf Code: https://lnkd.in/gPTUt4ue #buildInPublic #AIAgents #LLM #python #openSource #devTools #AIEngineering
To view or add a comment, sign in
-
DSA series ... 🚀 Chapter 4: Bit Manipulation (Leetcode#201 - Level "Medium" : Bitwise AND of Number Range) --- Problem: Given two integers `left` and `right`, return the bitwise AND of all numbers in the range `[left, right]`. Constraints : * 0 ≤ left ≤ right ≤ 2³¹ - 1 This problem is not about brute force. It’s about understanding how bits behave when numbers grow. --- 🔁 Why brute force is bad? Naive approach: 5 & 6 & 7 Works here, but imagine: left = 1, right = 2,147,483,647 😅 Too slow. --- ⚡ Smart Approach... Instead of checking all numbers, we eliminate unstable bits from the right. Trick: 👉 right = right & (right - 1) This removes the lowest set bit. --- 🔄 Let’s simulate Step 1⃣ left = 5 (101) right = 7 (111) Step 2⃣ right = 7 & 6 111 & 110 = 110 (6) Step 3⃣ right = 6 & 5 110 & 101 = 100 (4) Step 4⃣ right = 4, left = 5 Stop (since right < left) Step 5⃣ right & left -> 4 & 5 = 4. --- ⏱ Complexity... Time: O(log n) Space: O(1) --- 🎯 Takeaway... * This problem is actually: “Find the common left bits of left and right”. * If a bit changes even once in the range, it becomes '0' in the final "AND". * Because AND needs all values to be 1. Even a single '0', result is 0. * We are removing all unstable bits from the right side, until only the common prefix remains. - Common prefix of: 101 and 111= 1xx -> 100. --- #DSA #BitManipulation #LeetCode #interviewPreparation #Coding #SoftwareEngineer
To view or add a comment, sign in
-
-
Mona v3 Released: ⚡ Faster 🎯 Leaner ⚙️ Broader Long overdue… but today it finally happened. We’re proud to announce the release of mona v3. This new version brings Python 2 and Python 3 compatibility (Python 3 recommended), support for both 32-bit and 64-bit targets, full integration with WinDBG and WinDBGX, continued compatibility with Immunity Debugger, and the use of the pykd-ext bootstrapper. It also includes a substantial refactor and modernization of the codebase, making it faster, leaner, and better prepared for the future. This post covers what changed, key improvements, important prerequisites, installation and migration guidance, and the current list of supported commands. Continue reading to learn all the details and discover how to get mona v3 up and running in your environment. Download links, setup instructions, and the GitHub repository are provided further down in this post....
To view or add a comment, sign in
-
🚀 𝐇𝐚𝐬𝐡𝐢𝐧𝐠 + 𝐏𝐫𝐞𝐟𝐢𝐱/𝐬𝐮𝐟𝐟𝐢𝐱 𝐒𝐮𝐦 𝐏𝐨𝐰𝐞𝐫𝐟𝐮𝐥 𝐏𝐚𝐭𝐭𝐞𝐫𝐧 𝐢𝐧 𝐂𝐨𝐦𝐩𝐞𝐭𝐢𝐭𝐢𝐯𝐞 𝐏𝐫𝐨𝐠𝐫𝐚𝐦𝐦𝐢𝐧𝐠 𝐏𝐫𝐨𝐛𝐥𝐞𝐦 𝐒𝐭𝐚𝐭𝐞𝐦𝐞𝐧𝐭: Given an integer array nums and an integer k, return true if there exists a continuous subarray of length at least 2 such that the sum of the subarray is a multiple of k. Example: nums = [23, 2, 6, 4, 7], k = 6 Output: true Because the entire array sum becomes 42 and 42 is divisible by 6. 🔥 𝐎𝐩𝐭𝐢𝐦𝐚𝐥 𝐈𝐝𝐞𝐚: Instead of checking every possible subarray using brute force O(N²), we can use: • Prefix Sum • Modulo Arithmetic • Hash Map 𝐊𝐞𝐲 𝐎𝐛𝐬𝐞𝐫𝐯𝐚𝐭𝐢𝐨𝐧: If two prefix sums give the same remainder when divided by k, then the subarray between them has a sum divisible by k. Suppose: prefixSum[i] % k == prefixSum[j] % k Then: (prefixSum[j] - prefixSum[i]) % k == 0 That means the subarray from i+1 to j is divisible by k. 💡 𝐀𝐩𝐩𝐫𝐨𝐚𝐜𝐡: Maintain running prefix sum Compute prefixSum % k Store first occurrence of every remainder in a hash map If same remainder appears again and distance between indices is at least 2, return true Why store only first occurrence? Because we want the maximum possible subarray length and earliest index gives larger distance. ⏱ Time Complexity: O(N) 📦 Space Complexity: O(N) This is one of the most important hashing concepts because the exact same logic is used in: • Count subarrays divisible by k • Longest subarray with equal 0s and 1s • Longest subarray with given sum • Continuous subarray sum problems • Prefix remainder based problems Optimal approach code link: https://lnkd.in/g5u3vPhd #CompetitiveProgramming #DSA #Hashing #PrefixSum #Cpp #Coding #Leetcode #Algorithms #Programmer #ProblemSolving
To view or add a comment, sign in
-
-
The most dangerous phrase in software is: "But it works on my machine." ⚠️ I decided to eliminate that phrase entirely for my latest project. This video captures the "black box" transformation—using the Nuitka compiler to translate thousands of lines of Python into optimized C code. It’s a tense few minutes watching the machine stitch together ezdxf, win32com, and Tkinter into a single, indestructible executable. The Mystery: Why go through the trouble of a C-level compilation instead of just running a script? Because when a tool hits the production floor, it needs to be more than just "code." It needs to be a professional-grade solution for engineering efficiency. The goal was to take a complex environment and vanish it—leaving behind nothing but a high-performance, standalone tool. The Result: The "Successfully created" message at the end isn't just a build log. It’s the birth of LCPL_Grey_Scaler.exe (v1.1). No Python installation needed. No dependency errors. Just pure, compiled speed. 🚀 #Python #SoftwareEngineering #Automation #CAD #Nuitka #Innovation #CodingLife #Engineering #Deployment
To view or add a comment, sign in
-
This week we released MNE-Python 1.12.0, available via PyPI, conda-forge, and our standalone installers. Highlights: - Read BCI2000 and MEF3 files, and multi-wavelength NIRS files - More robust readers for CNT, EDF, and GDF files - Reports now include ICA component timecourses - Current Source Density (CSD) functions are now faster and use less memory - You can now plot CSD for embedded electrodes - Support for Hierarchical Event Descriptors (HED tags) in Annotations - Finer-grained control over anonymization Thanks to the 37 contributors to this release, including 19 first-time contributors: Akhilesh Yadav, Aman Srivastava, Aniket Singh Yadav, Benedikt Ehinger, Christoph Huber-Huber, Famous Raj Bhat, Gnaneswar Lopinti, Hansuja Budhiraja, Himanshu Mahor, Kay Robbins, Konstantinos Tsilimparis, Melih Yayli, Natneal B, Pragnya Khandelwal, Shruti Bhale, Tamas Fehervari, Teemu Taivainen, Thomas Caswell, and Varun Kasyap Pentamaraju. 💛🧡❤️🤍💙🩵
To view or add a comment, sign in
-
Happy to see the MNE-Python 1.12.0 release go live! It’s been a rewarding experience contributing to the core performance and 3D visualization modules. Huge thanks to Dan McCloy, Eric Larson and the whole MNE-python team for the mentorship—onward to more science in 1.13! Check out the full release notes here: https://lnkd.in/g64sExPk #MNEPython #Neuroscience #OpenSource #Python #ScientificComputing
This week we released MNE-Python 1.12.0, available via PyPI, conda-forge, and our standalone installers. Highlights: - Read BCI2000 and MEF3 files, and multi-wavelength NIRS files - More robust readers for CNT, EDF, and GDF files - Reports now include ICA component timecourses - Current Source Density (CSD) functions are now faster and use less memory - You can now plot CSD for embedded electrodes - Support for Hierarchical Event Descriptors (HED tags) in Annotations - Finer-grained control over anonymization Thanks to the 37 contributors to this release, including 19 first-time contributors: Akhilesh Yadav, Aman Srivastava, Aniket Singh Yadav, Benedikt Ehinger, Christoph Huber-Huber, Famous Raj Bhat, Gnaneswar Lopinti, Hansuja Budhiraja, Himanshu Mahor, Kay Robbins, Konstantinos Tsilimparis, Melih Yayli, Natneal B, Pragnya Khandelwal, Shruti Bhale, Tamas Fehervari, Teemu Taivainen, Thomas Caswell, and Varun Kasyap Pentamaraju. 💛🧡❤️🤍💙🩵
To view or add a comment, sign in
-
Glad to be part of the MNE-Python 1.12.0 release. This update brings meaningful improvements in performance, broader file support, and more efficient neuroimaging workflows. It’s great to see the continued momentum of the open-source community behind MNE and the impact it’s enabling for researchers.
This week we released MNE-Python 1.12.0, available via PyPI, conda-forge, and our standalone installers. Highlights: - Read BCI2000 and MEF3 files, and multi-wavelength NIRS files - More robust readers for CNT, EDF, and GDF files - Reports now include ICA component timecourses - Current Source Density (CSD) functions are now faster and use less memory - You can now plot CSD for embedded electrodes - Support for Hierarchical Event Descriptors (HED tags) in Annotations - Finer-grained control over anonymization Thanks to the 37 contributors to this release, including 19 first-time contributors: Akhilesh Yadav, Aman Srivastava, Aniket Singh Yadav, Benedikt Ehinger, Christoph Huber-Huber, Famous Raj Bhat, Gnaneswar Lopinti, Hansuja Budhiraja, Himanshu Mahor, Kay Robbins, Konstantinos Tsilimparis, Melih Yayli, Natneal B, Pragnya Khandelwal, Shruti Bhale, Tamas Fehervari, Teemu Taivainen, Thomas Caswell, and Varun Kasyap Pentamaraju. 💛🧡❤️🤍💙🩵
To view or add a comment, sign in
-
Most people don’t realize this yet: You can turn Claude Desktop into your own custom tool — in a day. I tried it. Built something useful. I created a custom MCP server that lets Claude find and clean duplicate photos — just from a prompt. No extra apps. No terminal. Just: "Find duplicates in D:\megha\Photos" "Move duplicates to a folder" And it handles everything. Why this matters: Most duplicate finder tools are either sketchy apps or scripts non-technical users won’t touch. I wanted AI to be the interface — you describe the task, it executes it. Under the hood: → Perceptual hashing (pHash) — detects visually similar images → Multithreaded scanning — handles 1900+ images smoothly → Async + non-blocking — Claude stays responsive → Safe cleanup — moves duplicates, doesn’t delete → Plug-and-play with Claude via JSON config Big takeaway: Building MCP servers is easier than it looks. The real challenge? Making them non-blocking so Claude doesn’t timeout. Once you solve that, you can turn almost any Python script into an AI tool. Built with: Python, MCP SDK, Pillow, imagehash, asyncio Open source: https://lnkd.in/gs4ExNec Curious — what would you automate if Claude could run your scripts? #ClaudeAI #MCP #AsyncPython #AIEngineering #DevCommunity #NoCode #LowCode #FutureOfWork
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development