Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

help with regexp needed

807569Jun 21 2006 — edited Jun 22 2006
Hello

I want to find all Z symbols not preceded by X or standing in the beginning of line
i.e.
in sequence ZXZZY I want to receive indexes 0,3
in sequence YXZZ I want to receive 3
in sequence ZYXY I want to receive 0
in sequence YZXZ I want to receive 1

I wrote regexp
[^[^X]][Z] 
that I thought ment
[[beginning of line] or[ NOT X] ]followed by [Z]
but it fails to find symbols that start in the beginning of line.
Please tell me were I'm wrong.

Regards,
V. S.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 20 2006
Added on Jun 21 2006
4 comments
142 views