Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- var a = "TESTE :P0 :P1 :P12 :P13 :P2 :P21";
- var matches = Regex.Matches(a, ":P[0-9]+($|\\s)");
- foreach (var match in matches)
- {
- a = a.Replace(match.ToString(), "'PPPP' ");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement