---
layout: post
title:  "Lookaround in Regex"
date:   2017-08-04 13:55:37 +0545
categories: programming regex
---


Lookarounds in regex are awesome non-capturing group. It is used to match pattern but not included in the matching list.  

# 1. Lookahead Positive
Find expression **A** that is followed by expression **B**:  
```bash
A(?=B)
```

# 2. Lookahead Negative 
Find expression **A** that is followed not by expression **B**:  
```bash
A(?!B)
```
# 3. Lookbehind Positive 
Find expression **A** that is preceded by expression **B**:  
```bash
(?<=B)A
```
# 4. Lookbehind Negative 
Find expression **A** that is not preceded by expression **B**:  
```bash
(?<!B)A
```

---
layout: post
title:  "Lookaround in Regex"
date:   2017-07-25 13:55:37 +0545
categories: programming regex
---


Lookarounds in regex are awesome non-capturing group. It is used to match pattern but not included in the matching list.  

# 1. Lookahead Positive
Find expression **A** that is followed by expression **B**:  
```bash
A(?=B)
```

# 2. Lookahead Negative 
Find expression **A** that is followed not by expression **B**:  
```bash
A(?!B)
```
# 3. Lookbehind Positive 
Find expression **A** that is preceded by expression **B**:  
```bash
(?<=B)A
```
# 4. Lookbehind Negative 
Find expression **A** that is not preceded by expression **B**:  
```bash
(?<!B)A
```

Fix date for first blog
Fix date for first blog
