Hey there,

im trying to create a regular expression to replace Tokens on an HTML page.

each token will begin with |~ and end with ~|
eg1: |~TOKEN1~|
eg2: |~MY TOKEN~|
eg2: |~Another_Token~|

these can lie anywhere in HTML page, so all i care about is whats between the start and end delimiters

im struggling with creating a pattern.
what i have tried is "|~[A-Za-z0-9_]~| but it doesnt work for me..

any help is appreciated