0

how to

A/B/1 A/B/5 A/B/8 A/B/9

become

C/D/1?XYZ C/D/5?XYZ C/D/8?XYZ C/D/9?XYZ

0

replace 'A/B/(\d+)' with 'C/D/\1?XYZ'

\1 refers to the first match in the regular expression. The first match is (\d+) in the replace string. (\d+) means find one or more digits, that is a character 0-9.

  • dear friend, not always "\1" but 1 5 8 9 keep in letter,, please help . example for another A/B/46855 become C/D/46855?XYZ – dr sameer Jan 14 '17 at 5:32
  • \1 refers to the first match in the regular expression. The first match is (\d) in the replace string. (\d) means find one digit, that is a character 0-9. – Stephen Rauch Jan 14 '17 at 5:33
  • for this example A/B/46855 become C/D/46855?XYZ not solved,, please help to solve this example,, – dr sameer Jan 14 '17 at 5:39
  • editted answer to handle multiple digit answers – Stephen Rauch Jan 14 '17 at 5:41

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.