user1526892
user1526892

Reputation: 67

Remove the delimiters in column value

I have value in snowlflake

"<p>jeep is back under the tree</p>"

The column is variant datatype in table.

How do i get only jeep is back under the tree, Any suggestion please.

Thanks,

Upvotes: 1

Views: 208

Answers (1)

Greg Pavlik
Greg Pavlik

Reputation: 11046

You can use the regexp_replace function to strip most HTML tags:

with T1 as
(
    select '<p>jeep is back under the tree</p>'::variant as V
)
select regexp_replace(V, '<[^>]*>', '') as HTML_TAGS_STRIPPED from T1
;

Output:

HTML_TAGS_STRIPPED
jeep is back under the tree

Upvotes: 1

Related Questions