Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Variable characters!!Pls pls help me!!
#1
I need some professional help guys. I have a large document containing lots of variable characters within square brackets(see below) I need a macro function to delete all the carachers within the brackets. All of them!

Samples:
['aenottdain, -nad-]
[ainoma'listik]
[,8eno:'gaenik]
...and they vary tremendously. The good news is they are in square brackets so I guess there might be a solution to my problem. I need that asap, that's the bad news.

Many thanks !
#2
This macro gets clipboard text, removes characters within [ ], and puts the modified text into the clipboard.

Code:
Copy      Help
str s.getclip
s.replacerx("(?<=\[)[^\]]+(?=\])")
;s.replacerx("\[[^\]]+\]") ;;to remove [] too, use this instead
s.setclip
#3
It's not working. A message box comes up saying Syntax error for:

;s.replacerx("\[[^\]]+\]") ;;to remove [] too, use this instead

I've cut and paste the formula given, into my macro. Maybe there is more to it.

Cheers


Forum Jump:


Users browsing this thread: 1 Guest(s)