收藏Tableau Community Forums Member (Inactive) (Salesforce) 提问于 #Test2023年9月7日 16:15How can I replace a backslash-n in a string?I have a string that looks like this: #TEST\n\nPost I'm using this regexp:if regexp_match([Hashtags], "\\n.*") then regexp_replace([Hashtag], "\\n.*", "") What I'm trying to get is #TEST, but when I use the above, it returns the original string instead.8 个回答排序按日期排序按最有帮助排序按日期排序加载更多评论...Don Wise2023年9月7日 16:23You could try:IF REGEXP_MATCH([Data],'(#)')THEN REGEXP_EXTRACT([Data],'(#\w+)') END Best, Don(Please, don't forget to click Select as Best or Upvote !)显示更多添加评论撰写回答...粗体斜体下划线删除线项目符号列表编号列表添加链接代码块插入图像附加文件链接 URL取消保存0/9000回复
Don Wise2023年9月7日 16:23You could try:IF REGEXP_MATCH([Data],'(#)')THEN REGEXP_EXTRACT([Data],'(#\w+)') END Best, Don(Please, don't forget to click Select as Best or Upvote !)显示更多