Need to remove the {} from input field - input$fieldname

I have an input field which it will have value like this --> {ABCD}{U23}.

Need to remove {} before hitting my impala query should be like this --> ABCDU23. I tried using gsub(), str_replace(), rm_curly() but no luck. Anyone came across this fix can help me.

Thanks

Try this:

stringr::str_replace_all("{ABCD}{U23}", "\\{|\\}", "")

?

I tried the below one but failed to get the output.

stringr::str_replace_all(input$fieldname, "\{|\}", "")

Try

library("tidyverse")
input
input <- input %>%
  mutate(fieldname = fieldname %>% str_replace_all("\{|\}", ""))
input

?

The above code is not working.

Is it below one work?
gsub("[{}]", "", input$fieldname)

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.