c# regular expression help

josephm67
josephm67 used Ask the Experts™
on
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
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
1. @"([Zz]\d*)"
2. @"([^Zz\d])"

HTH,
Dan

Author

Commented:
thanks

Commented:
Glad I could help!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial