Question: I got a view in angularjs and I'm just trying to display the current date.

**html**

```
 <input type="text" class="form-control" ng-model="lis.ModifiedDate" id="ModifiedDate">

```

**app.js**

```
$scope.ModifiedDate = $filter("ModifiedDate")(Date.now(), 'yyyy-MM-dd');

```

Can you please assist me here i want to display default date and the save it on a table.

Answer: 
You want to use the [lookahead operator](http://www.regular-expressions.info/lookaround.html).

### Positive lookahead or *detect if something is present after (ahead)*

Try this regex instead:

```
\/(?=\w)

```

[DEMO](https://regex101.com/r/zH2xJ0/1)

We use here the positive lookahead operator `(?=)`. It will "detect" the position of a given expression but won't match the expression.

### Negative lookahead or *detect if something is NOT present after (ahead)*

Alternatively, you can also use the negative look ahead operator `(?!)`.

```
\/(?![@])

```

[DEMO](https://regex101.com/r/zH2xJ0/3)

### Negative lookahead with multiple special characters

This will match any `/` NOT followed by `@`. If you have more special characters, simply add them to the character class.

For example, if `#` and `%` were special characters, the regular expression above would become:

```
 \/(?![@#%])

```

[DEMO](https://regex101.com/r/zH2xJ0/4)
Matching slashes NOT followed by NON word character is not the same than followed by word character.

Have a try with:

```
/(?!\W)

```

This matches `slashes NOT followed by NON word character`

It matches the final slash in string: `PErs/`