

Task

   match a string against a regular expression
   substitute part of a string using a regular expression


StringCases["I am a string with the number 18374 in me",RegularExpression["[0-9]+"]]
StringReplace["I am a string",RegularExpression["I\\sam"] -> "I'm"]