Yet another REX question

Post Reply
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

Yet another REX question

Post by barry.marcus »

I simply want to strip the substrings "B1", "B2", "B3", etc. from the another string when they appear at the END of that string (they won't always be there). The rest of the strings will always be digits. (These are patent numbers.) In other words, the whole strings will look like:

7334235B2
7334221
7442351B1

and so on. I want to strip off the Bn from the end, and I can't see what the expressions in sandr should be.

Thanks in advance.
User avatar
John
Site Admin
Posts: 2597
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Yet another REX question

Post by John »

If it's a single digit:

<sandr "B\digit>>=" "" $var>

For possibly multiple digits:

<sandr "B=\digit+>>=" "" $var>
John Turnbull
Thunderstone Software
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

Yet another REX question

Post by mark »

Correction for single digit:

<sandr "B\digit=>>=" "" $var>
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

Yet another REX question

Post by barry.marcus »

Thanks very much!
Post Reply