Last active
January 12, 2017 13:37
-
-
Save sivaprabug/96ba3d0554e9086d80cd963995eb883a to your computer and use it in GitHub Desktop.
Remove [ and ] in ipv6 address using JavaScript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title> Remove [ and ] in ipv6 address using JavaScript</title> | |
| <h1 align="center"><u> Remove [ and ] in ipv6 address using JavaScript</u></h1> | |
| <script> | |
| var ipv6 = '[2001:0db8:0000:0000:0000:ff00:0042:8329]'; | |
| // var ipv6 = '10.0.124.75'; | |
| ipv6 = ipv6.replace(/[\]\[]/g, ''); | |
| console.info('ipv6', ipv6); | |
| </script> | |
| </head> | |
| <body> | |
| <div align="center"> | |
| </div> | |
| <ol> | |
| </ol> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment