Converting a CSV file to RegX with PowerShell

If you need to convert a CSV file with terms to a RegX file for use in your .Net project, you can use this simple PowerShell script:

The script assumes your CSV file contains two columns, “Name” and “Value”, such as this:

You can use Excel to export such files. You may need to change the -Delimiter parameter in the script to match your locale (Why? See my post on working with CSV files in Excel).

This entry was posted in Development, Tips and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *