> For the complete documentation index, see [llms.txt](https://regex-simplify.lacostar.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://regex-simplify.lacostar.fr/docs/web/e-mail.md).

# E-mail

{% tabs %}
{% tab title="Functions types" %}

```typescript
email(email: string): { 
    include: boolean, 
    matchs: RegExpMatchArray | null, 
    groups: Array<{ user: string, domain: string } | null> | null
}
```

{% endtab %}

{% tab title="Code example" %}
**Search e-mail in a string:**

```javascript
const { web } = require('regex-simplify');

const email = web.email(`
    lama.loca.loca123@inca.com
    test@test.co.uk
    test @ outlook.com
`);

console.log(email);
```

{% endtab %}

{% tab title="Function return" %}
**And here what return the function:**

```javascript
{
  include: true,
  matchs: [ 'lama.loca.loca123@inca.com', 'test@test.co.uk' ],     
  groups: [
    [Object: null prototype] {
      user: 'lama.loca.loca123',
      domain: 'inca.com'
    },
    [Object: null prototype] { user: 'test', domain: 'test.co.uk' }
  ]
}
```

{% endtab %}
{% endtabs %}
