I am trying to write a regex that can replace '[', ']' and '].' with '_' and in cases where ']' is the last character it should be replaced with '' but I am struggling to come up with a regex for it that works in all cases because Snowflake does not support lookahead & lookbehind.
My question is, has anyone tried/achieved to do this before? or is it impossible and I should just give up??
Eg:
-
look_behind --> look_behind_0
- look_behind_positive --> look_behind_0_positive_1
Asked by Pepe Silvia
(11 rep)
Apr 14, 2024, 11:20 PM
Last activity: Apr 15, 2024, 11:40 PM
Last activity: Apr 15, 2024, 11:40 PM