Solved

c# regular expression help

Posted on 2014-03-04
3
266 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

Use Filtering Commands to Process Files in Linux

Learn how to manipulate data with the help of various filtering commands such as `cat`, `fmt`, `pr`, and others in Linux.

Question has a verified solution.

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

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

617 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