Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

c# regular expression help

Posted on 2014-03-04
Last Modified: 2014-03-04

Please help me to write 2 regular expressions:

text= Z1cvgZ55Z1z89bavc

1) I want to extract all Z or z with numbers like output should be:
Starting characters is z or Z.

2) extract all characters which do not contain Z or z with numbers too. The output should be like

They are the remaining of above expression.

Please help me or guide me.

Question by:josephm67
  • 2
LVL 34

Accepted Solution

Dan Craciun earned 500 total points
ID: 39903707
1. @"([Zz]\d*)"
2. @"([^Zz\d])"


Author Closing Comment

ID: 39903808
LVL 34

Expert Comment

by:Dan Craciun
ID: 39903838
Glad I could help!

Featured Post

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MailAddress in vb 4 29
Add a Condition in ASP Repeater 6 34
Convert Ctime to date time in textfile? 7 32
C#.net split string and then check appropriate checkboxlist 4 27
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question