fork(12) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. string strValue = "OFFSET NUMBER ROWS";
  8. string strIndex = "5";
  9. strValue = Regex.Replace(strValue , @"(?<=OFFSET\s*)\w+(?=\s*ROWS)", strIndex);
  10. Console.WriteLine(strValue);
  11. Console.WriteLine(Regex.Replace(strValue , @"(OFFSET\s*)\w+(\s*ROWS)", $"${{1}}{strIndex}$2"));
  12. }
  13. }
Success #stdin #stdout 0.08s 19764KB
stdin
Standard input is empty
stdout
OFFSET 5 ROWS
OFFSET 5 ROWS