---
title: "preg_match_all..."
type: "forum-thread"
url: "https://www.webforum.nu/amne/php/67526-preg-match-all"
topic: "PHP"
topic_url: "https://www.webforum.nu/amne/php"
author: "Mungo"
published: "2003-02-07T13:21:22.000Z"
updated: "2003-02-07T13:31:20.000Z"
replies: 1
views: 159
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/php/67526-preg-match-all"
---

# preg_match_all...

## #1 — Mungo, 2003-02-07T13:21Z

Hjälp...

Kan nån svara på varför följande:

```php
preg_match_all("/([a-zA-Z.-_]+)(@)([w.-_]+)(\.)(\w+)/i", $body, $matches);
```

...tar med "\<" om man i strängen $body har t.ex. "\<adress@host.se\>" 

???

Permalänk: https://www.webforum.nu/p/67526

## #2 — Mungo, 2003-02-07T13:31Z

Löste det själv med följande ändring:

```php
preg_match_all("/([\\w\\.\\-\\_]+)(@)([\\w\\.\\-\\_]+)(\\.)(\\w+)/i", $body, $matches);
```

Permalänk: https://www.webforum.nu/p/943140

---

Tråden på webben: https://www.webforum.nu/amne/php/67526-preg-match-all
