0

Hello there I need regex expression which can do following transformation

alabala-1000 Intern -> alabala/alabala-1000/Intern

part before minus sign should be extracted and then space between alabala-1000 and Intern should be detected aswell

dian mushkov
  • 61
  • 1
  • 13

1 Answers1

1

You can use something like:

resultString = Regex.Replace(subjectString, @"(.+)-(\d+)\s+(.+)", @"$1/$1-$2/$3");

enter image description here


Regex Demo
C# Demo

Pedro Lobito
  • 94,083
  • 31
  • 258
  • 268