Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Replace string combination "]

    Hello,

    It's been a while since I last used string-based replacement, but I recall a workaround for a similar issue.

    I aim to replace observations that match the string: "] with an empty string ""

    However, none of my attempts have been successful thus far. T

    I've tried:
    Code:
    replace myvariable = "" if myvariable == ""]"
    Unfortunately, this results in the error 'too many ')' or ']'' as I somewhat anticipated.

    I would appreciate any insights or suggestions to resolve this issue. Thank you!

  • #2
    Figured it out:
    Code:
    replace myvariable= "" if myvariable== `""]"'

    Comment

    Working...
    X