Skip to main content

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 answers
  1. Sep 7, 2023, 4:23 PM

    You could try:

    IF REGEXP_MATCH([Data],'(#)')

    THEN REGEXP_EXTRACT([Data],'(#\w+)') END

     

    You 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 !)

     

    Best, Don

    (Please, don't forget to click Select as Best or Upvote !)

0/9000