I am trying to write a regex expression in PCRE which captures the first part of a word and excludes the second portion. The first portion needs to accommodate different values depending upon where the transaction is initiated from. Here is an example:

**Raw Text:**

```
.controller.CustomerDemographicsController

```

**Regex Pattern Attempted:**

```
\.controller\.(?P<Controller>\w+)

```

**Results trying to achieve** (in **bold** is the only content I want to save in the named capture group):

> 
> .controller.**CustomerDemographics**Controller
> 
> 
> 

NOTE: I've attempted to exclude using `^`, lookback, and lookforward.

Any help is greatly appreciated.