RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Tab Delimited Parser
Expression
[^\t]+|\t(?=\t)|\t$
Description
I wrote this for a company that was importing a variety of rich text separated by tabs. By applying this regular expression, you can filter out even empty fields which return as a single tab qualified by a tab in front of them unless its the end of the string, which will return a single tab as well. You can filter out the returned tabs in your .NET code. For NEWBIES, this expression says: "Return anything but Tabs, and separate data by the tabs" [^\t]+ "Or" | "For Empty Tabs, Return those that have a tab in front of them" \t(?=\t) "Or" | "Return Empty Tabs at the end of a string" \t$ Hope this helps you on your journey in learning Regular Expressions! You can contact me using my form at http://www.thomasdcox.com/contactme.aspx
Matches
[a-zA-Z0-9,:!@#$%^&*()-+={}[]"',.]
Non-Matches
Tabs
Author Rating: Not yet rated. Thomas Cox
Source Thomas Cox
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials