Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Check selected text and delete...
#1
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.
#2
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.
#3
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.
#4
Macro
Code:
Copy      Help
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


Forum Jump:


Users browsing this thread: 1 Guest(s)