Skip to content

Commit 4dc8838

Browse files
228 cloning an object ending with a number create an exception (#231)
* [ROOT][DOCS] contrib-readme-action has updated readme * removed the need for non-digit before the digit in the regex --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 634f930 commit 4dc8838

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎EDSEditorGUI/InsertObjects.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ private bool Verify(bool InitiallyDisableIfError = false)
159159
int j = 1;
160160
foreach (ODentry od in srcObjects.Values)
161161
{
162-
String numpattern = @"(\w*\d+\Z)";
162+
String numpattern = @"(\d+\Z)";
163163
string newname;
164164

165165
string[] words = Regex.Split(od.parameter_name, numpattern);
@@ -235,7 +235,7 @@ private void Button_create_Click(object sender, EventArgs e)
235235
UInt16 newIndex = (UInt16)(od.Index + o);
236236
ODentry newObject = od.Clone();
237237

238-
String pattern = @"(\w*\d+\Z)";
238+
String pattern = @"(\d+\Z)";
239239

240240
string[] words = Regex.Split(od.parameter_name, pattern);
241241
// MatchCollection nummatches = System.Text.RegularExpressions.Regex.Matches(od.parameter_name, numpattern);

0 commit comments

Comments
 (0)