Posts: 42
Threads: 23
Joined: Oct 2008
Hi,
I'm currently selecting some text using getsel, however i'm looking to delete part of the selected text that contains CUST-1.
Is this possible?
Thanks,
Paul.
Posts: 1,000
Threads: 253
Joined: Feb 2008
There are a lot of ways to manipulate text.
Is it always CUST-1, or does it change around? (i.e. CUST-2, CUST-3)
Is CUST-1 at the beginning or end?
Post multiple examples of the text you are trying to work with.
Posts: 42
Threads: 23
Joined: Oct 2008
The text will change CUST-1, CUST-2 or CUST-3 and can be anywhere within the string of text.
eg. AT CUST-2 SE
eg. CUST-2 SE
eg. ATSE CUST-2
Thanks.
Posts: 12,073
Threads: 140
Joined: Dec 2002
Macro
str s=
;AT CUST-2 SE
;eg. CUST-2 SE
;eg. ATSE CUST-2
s.replacerx("\bCUST-\d+\b")
out s
\b word boundary
\d digit
+ 1 or more