# preg\_replace help

**URL:** <https://forum.kirupa.com/t/preg-replace-help/308069>\
**Category:** programming\
**Created:** [April 16, 2010, 4:21pm UTC](https://forum.kirupa.com/t/preg-replace-help/308069 "2010-04-16T16:21:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![forza\_stiinta](https://avatars.discourse-cdn.com/v4/letter/f/bc79bd/32.png) [@forza\_stiinta](https://forum.kirupa.com/u/forza_stiinta)\
**Post date:** [April 16, 2010, 4:21pm UTC](https://forum.kirupa.com/t/preg-replace-help/308069/1 "2010-04-16T16:21:14Z")

</div>

I could never understand how preg works.

I have a string like this: “\<option value=“Arad”\>Arad \</option\>\<option value=“Aciuta”\>Aciuta \</option\>\<option value=“Adea”\>Adea \</option\>\<option value=“Agrisu Mare”\>Agrisu Mare \</option\>”

I want to clean all \<option value=“zzz”\> so that I end up just with the names between tags. How can I do this?

If you know a good and understandable tutorial about this, please post it.

Thanks!
