---
layout: page
title: CC0010
tagline: RegexAnalyzer
---

|TypeName|RegexAnalyzer |
|Check Id | CC0010 |
|Category | Naming |
|Severity | Error |

# Cause

This diagnostic compile the Regex expression and trigger if the compilation fail by throwing an exception.

# Example

{% highlight csharp %}
Regex.Match("", "[");
{% endhighlight %}

# Analyzer

An error will be triggered in your code:

![Code fix]({{ BASE_PATH }}/assets/images/CC0010/analyzer0.png)  
![Code fix]({{ BASE_PATH }}/assets/images/CC0010/analyzer1.png)

# Related rules

None

# See also

TBD

---
layout: page
title: CC0010
tagline: RegexAnalyzer
---

|TypeName|RegexAnalyzer |
|Check Id | CC0010 |
|Category | Naming |
|Severity | Error |

# Cause

The regular expression is invalid and will fail at run-time.

# Example

{% highlight csharp %}
Regex.Match("", "[");
{% endhighlight %}

# Analyzer

An error will be triggered in your code:

![Code fix]({{ BASE_PATH }}/assets/images/CC0010/analyzer0.png)  
![Code fix]({{ BASE_PATH }}/assets/images/CC0010/analyzer1.png)

# Related rules

None

# See also

TBD

Change Cause from "how it works" to "why it fails"
Change Cause from "how it works" to "why it fails"