Click here to Skip to main content
14,298,783 members
   

C#

 
AnswerRe: Extracting regex from string Pin
Gerry Schmitz21-Apr-19 3:07
mveGerry Schmitz21-Apr-19 3:07 
AnswerRe: Extracting regex from string Pin
#realJSOP21-Apr-19 5:12
mve#realJSOP21-Apr-19 5:12 
GeneralRe: Extracting regex from string Pin
jschell21-Apr-19 7:48
memberjschell21-Apr-19 7:48 
GeneralRe: Extracting regex from string Pin
#realJSOP21-Apr-19 11:45
mve#realJSOP21-Apr-19 11:45 
GeneralRe: Extracting regex from string Pin
jschell27-Apr-19 6:11
memberjschell27-Apr-19 6:11 
GeneralRe: Extracting regex from string Pin
ormonds21-Apr-19 12:19
memberormonds21-Apr-19 12:19 
AnswerRe: Extracting regex from string Pin
jschell21-Apr-19 7:52
memberjschell21-Apr-19 7:52 
AnswerRe: Extracting regex from string Pin
Luc Pattyn22-Apr-19 15:45
professionalLuc Pattyn22-Apr-19 15:45 
Hi,

I would not use Regex at all. Instead, have the filename pattern specified as a string where some special codes are allowed, and will be replaced by their actual value.

Your example could be defined by "Project{P}-{N}-{D}-{V}.dat", and now your code should replace
{P} by the project name 
{N} by the project number
{D} by the drawing number
{V} by the version number/letter

which basically takes four calls to string.Replace(), where you:
1. may or may not enforce these codes to be present;
2. may or may not allow for case-insensitivy when looking for those codes;
3. must take care of avoiding illegal filenames; you may have to create a project name clone
that does not contain any character that would be unacceptable in a file name.


Smile | :)
Luc Pattyn [My Articles] Nil Volentibus Arduum

QuestionI need help with console app in C# Pin
AshraBukha20-Apr-19 11:24
memberAshraBukha20-Apr-19 11:24 
AnswerRe: I need help with console app in C# (old mac donald had a farm) Pin
OriginalGriff20-Apr-19 11:31
protectorOriginalGriff20-Apr-19 11:31 
AnswerRe: I need help with console app in C# (old mac donald had a farm) Pin
Dave Kreskowiak20-Apr-19 13:01
mveDave Kreskowiak20-Apr-19 13:01 
AnswerRe: I need help with console app in C# (old mac donald had a farm) Pin
Luc Pattyn20-Apr-19 15:27
professionalLuc Pattyn20-Apr-19 15:27 
GeneralRe: I need help with console app in C# (old mac donald had a farm) Pin
Dave Kreskowiak20-Apr-19 15:54
mveDave Kreskowiak20-Apr-19 15:54 
Questionmy programming language is c#.I have a form in tabpage. if i want to resize the form like visual studio.what the... I should doing Pin
Member 1432102120-Apr-19 5:47
memberMember 1432102120-Apr-19 5:47 
AnswerRe: my programming language is c#.I have a form in tabpage. if i want to resize the form like visual studio.what the... I should doing Pin
OriginalGriff20-Apr-19 6:03
protectorOriginalGriff20-Apr-19 6:03 
GeneralRe: my programming language is c#.I have a form in tabpage. if i want to resize the form like visual studio.what the... I should doing Pin
Member 1432102120-Apr-19 6:15
memberMember 1432102120-Apr-19 6:15 
GeneralRe: my programming language is c#.I have a form in tabpage. if i want to resize the form like visual studio.what the... I should doing Pin
OriginalGriff20-Apr-19 6:24
protectorOriginalGriff20-Apr-19 6:24 
AnswerRe: my programming language is c#.I have a form in tabpage. if i want to resize the form like visual studio.what the... I should doing Pin
Gerry Schmitz20-Apr-19 6:06
mveGerry Schmitz20-Apr-19 6:06 
GeneralRe: my programming language is c#.I have a form in tabpage. if i want to resize the form like visual studio.what the... I should doing Pin
OriginalGriff20-Apr-19 6:18
protectorOriginalGriff20-Apr-19 6:18 
GeneralRe: my programming language is c#.I have a form in tabpage. if i want to resize the form like visual studio.what the... I should doing Pin
Gerry Schmitz20-Apr-19 8:22
mveGerry Schmitz20-Apr-19 8:22 
AnswerRe: my programming language is c#.I have a form in tabpage. if i want to resize the form like visual studio.what the... I should doing Pin
Simon_Whale20-Apr-19 6:14
professionalSimon_Whale20-Apr-19 6:14 
AnswerRe: my programming language is c#.I have a form in tabpage. if i want to resize the form like visual studio.what the... I should doing Pin
BillWoodruff23-Apr-19 7:49
mveBillWoodruff23-Apr-19 7:49 
QuestionMerge Sort linked list Pin
Member 1431822319-Apr-19 12:23
memberMember 1431822319-Apr-19 12:23 
AnswerRe: Merge Sort linked list Pin
#realJSOP19-Apr-19 12:38
mve#realJSOP19-Apr-19 12:38 
GeneralRe: Merge Sort linked list Pin
Member 1431822320-Apr-19 9:12
memberMember 1431822320-Apr-19 9:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.