Skip to Content
0
Former Member
Jan 03, 2012 at 10:49 AM

Contain Pattern issue

17 Views

Hi All,

I have a requirement where I need to replace the 'X' in the string.

EX: 1. ABCDXXX

2. ABXXCDXX

The output should be

1. ABCD

2. ABXXCD.

This mean I need to replace all the X which comes last in the string. There is a possiblity that X may come in between like Ex 2.

So that X should remain same.

What pattern I can give for this Or any other solution.

Kindly help.