How to insert multiple ":" in a string

Hi there,

I'm getting a MAC Address without ":" character betweend the characters.

example:

001122334455

But want to get this version

00:11:22:33:44:55

How to do this in a efficient way?

Thank you!

"001122334455".match(/.{2}/g).join(':')

image

Wow, thanks for the fast and correct answer!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.