I want to search the following formats: ([1234567890]*)R or P([1234567890]*) this means there must be a 'P' before the number or a 'R' after the number. However, I think I can't use this: P?([1234567890]*)R? because the number without P and R is also matched! How can I express it? thx! Stephen