# Regular expression for remove anchor tag

**URL:** <https://forum.kirupa.com/t/regular-expression-for-remove-anchor-tag/233184>\
**Category:** web dev\
**Created:** [July 20, 2007, 9:49pm UTC](https://forum.kirupa.com/t/regular-expression-for-remove-anchor-tag/233184 "2007-07-20T21:49:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![imvain2](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/imvain2/32/620_2.png) [@imvain2](https://forum.kirupa.com/u/imvain2)\
**Post date:** [July 20, 2007, 9:49pm UTC](https://forum.kirupa.com/t/regular-expression-for-remove-anchor-tag/233184/1 "2007-07-20T21:49:33Z")

</div>

I need a javascript function to do the conversion below. I believe it needs to be a regular expression.

I need to convert

```auto

<a href="http://aaa.com">http://aaa.com</a>

```

to

[http://aaa.com](http://aaa.com)
