---
title: "Regex Spilt based on multiple delimiters in C#"  
description: "Regex Spilt based on multiple delimiters in C#"  
author: "Anonymous User"  
published: 2013-07-09  
updated: 2013-07-09  
canonical: https://www.mindstick.com/forum/1267/regex-spilt-based-on-multiple-delimiters-in-c-sharp  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Regex Spilt based on multiple delimiters in C#

Hi [Developers](https://www.mindstick.com/articles/12875/blunders-you-must-avoid-while-hiring-java-developers-to-get-the-best-fulfilling-your-needs),\
I have a [string](https://www.mindstick.com/articles/1527/string-split-in-c-sharp) of type "KeyOperatorValue1,Value2,Value2....". For [e.g](https://www.mindstick.com/forum/157370/how-to-swap-neighbor-characters-in-string-e-g-string-demo-would-be-edom) = "[version](https://www.mindstick.com/articles/12845/things-to-remember-while-migrating-odoo-to-a-better-version)>=5", "lang=en,fr,es" etc and currently, \
the possible value for [operator](https://www.mindstick.com/blog/144/union-intersection-and-except-operator-in-sql-server) field is "=", "!=", ">", ">=", "<", "<=", but I don't want it to be limited to them only. \
Now the [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic) is given such a string, how can I split into a triplet?\
Since, all the operator's string representation are not mutually exclusive("=" is a subset of ">="), I can't use [public](https://www.mindstick.com/blog/11097/java-access-modifiers-the-public-and-the-private-modifiers) \
string[] Split(string[] separator, StringSplitOptions [options](https://www.mindstick.com/articles/43878/making-the-best-use-of-the-options-trade-ideas)) and the Regex.Split doesn't have a [variant](https://www.mindstick.com/interview/52/what-is-variant-datatype-in-vb-script) which takes \
[multiple](https://www.mindstick.com/blog/12797/iowa-is-expected-to-see-heavy-growth-in-multiple-sectors) regex as parameters.\
Thanks in advance. \

## Replies

### Reply by AVADHESH PATEL

Hi Ankita,\
try as following line of code\
**"(\w+)(=|!=|>(?!=)|>=|<(?!=)|<=)([^"]+)"****\**I hope it helpful for you.


---

Original Source: https://www.mindstick.com/forum/1267/regex-spilt-based-on-multiple-delimiters-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
