Case number parser core is a .NET 6.0 library with long term support.
Case number parser is a simple library that can be used to parse North Carolina judicial system case numbers into a standardized format. Note: This library is designed to support trial court level case numbers only. Modifications will be required for appellate divisions.
- E - Estates
- R - Registrations
- M - Miscellaneous
- T - Transcript
- Two digit year: 00 X 000000
- Four digit year: 0000 X 000000
- SP - Special Proceedings
- JA - Juvenile Abuse/Neglect/Dependency
- JB - Juvenile Delinquency
- JT - Juvenile Termination of Parental Rights
- JR - Judicial Review - Responsible individuals list
- JW - Judicial Waiver
- JE - Emancipation
- EO - Estate Other
- CR - Criminal District
- IF - Infraction
- Two digit year: 00 XX 000000
- Four digit year: 0000 XX 000000
- CVD - Civil District
- CVS - Civil Superior
- CRS - Criminal Superior
- CVM - Civil District - Magistrate Division
- CVR - Civil Revocation
- Two digit year: 00 XXX 000000
- Four digit year: 0000 XXX 000000
Add nuget package to project by using the nuget package manager UI. Add:
MoleculeSoftware.Packages.CaseNumberParser.Core
or from the dotnet CLI use the command:
dotnet add package MoleculeSoftware.Packages.CaseNumberParser.Core
- Import the appropriate namespace
using CaseNumberParser;
- Use the ParseEngine to parse your case number
public void SomeFunction(string caseNumber)
{
// ... other logic
// Parse Case Number
// NOTES:
If a case number fails to parse you will receive an empty string in response. This method handles all exceptions by returning an empty string. Please see the formatting requirements below to achieve proper parsing.
var parsedCaseNumber = ParseEngine.ReturneParsed(caseNumber, CaseNumberFormat.TwoDigitCaseType, YearFormat.TwoDigit);
// ... other logic
}
- Case number must at least have a two digit year at positions 0 and 1 of the string's char[]. Optionally, the developer can use the full year, Ex: 2023, instead of a two digit year, Ex. 23. In this case the four digit year will be at positions 0-3 of the string's char[].
- A single space after the case number at either position 2 or position 4.
- When calling the ParseEngine.ReturnParsed method you will specify the expected input year format.
- NOTE: The year section of a case number requires proper input to function properly. Any deviation from the two or four digit year will result in a failed parse.
- Case type must at least contain a single digit at positions 3 or position 5. The case type can contain up to three digits depending on the case type.
- A single space after the case type at either position 4, 5, or 6 for two digit year formats. or 6, 7, or 8 for four digit year formats.
- Case type will automatically correct for character casing. Therefore, if the input for case type is "aa" it will be corrected to "AA" after parsing.
- Case sequence must contain at least a single integer digit at positions 5, 6, or 7 for two digit year types, or 7, 8, or 9 for four digit year types.
- Case sequence supports up to 999,999 cases within a specific type. It is highly unlikely that this ceiling will ever be reached within a single year in any of the 100 N.C. counties.
- Case sequence will be parsed as follows. Examples are not exhaustive
- Ex: 00 AA 1 parses to 00 AA 000001
- Ex: 00 A 01 parses to 00 A 000001
- Ex: 00 CVD 2715 parses to 00 CVD 002715
- Ex: 23 ja 27 parses to 23 JA 000027
- Ex: 1 ja 27 parses to an empty string because case year is invalid.
- Ex: 23 ja 27 parses to an empty string because an extra space exists between the case year and case type sections.
- Ex: 23 JA parses to an empty string because the sequence is missing.