What regex would I need to get <t:1583277337:R> to then replace it so it display the proper information (in this case: 3 Years ago)
Why?
I'm trying to use it on Discord where Discord automatically converts <t:1583277337:R> to the corresponding data, but the API retrieved data (below) doesnt automatically convert on Discord Embeds
Data
"bio": "𝖓𝖔𝖙 𝖊𝖛𝖊𝖗𝖞𝖔𝖓𝖊 𝖜𝖎𝖑𝖑 𝖇𝖊𝖑𝖎𝖊𝖛𝖊 𝖎𝖓 𝖞𝖔𝖚, 𝖇𝖚𝖙 𝖓𝖔𝖙 𝖊𝖛𝖊𝖗𝖞𝖔𝖓𝖊 𝖒𝖆𝖙𝖙𝖊𝖗𝖘...\n\n\n<t:1583277337:R> <3"
I won't give you the full solution, but here is the logic:
<t:, in sequence:R>You can use this regex in String#replace. The replace method can accept a callback as its second argument for a more powerful parsing of a match. In this case, you can process the string in the replace callback to whatever text you need