Solved

c# regular expression help

Posted on 2014-03-04
3
262 Views
Last Modified: 2014-03-04
Hi,

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:
Z1
Z55
Z1
z89
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
cvgbavc

They are the remaining of above expression.

Please help me or guide me.

Thanks
0
Comment
Question by:josephm67
[X]
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
  • 2
3 Comments
 
LVL 35

Accepted Solution

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

HTH,
Dan
0
 

Author Closing Comment

by:josephm67
ID: 39903808
thanks
0
 
LVL 35

Expert Comment

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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
vb.net dbnull syntax 1 59
Pdf not loading 2 40
sql server connection string in config file 4 41
Suppress if value zero or NULL in crystal report 2 43
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

738 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