Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. changeDateFormat01[s_String] := Block[
  2. {ss, pp},
  3. ss = s;
  4. Do[
  5. ss = StringReplacePart[ss,
  6. "'" <> StringTake[ss, {pp[[1]] + 1, pp[[2]] - 1}] <> "'", pp],
  7. {pp, Reverse@
  8. StringPosition[ss, RegularExpression["\#\d+\/\d+\/\d+\#"]]}
  9. ];
  10. ss
  11. ]
  12.  
  13. (* "hello'1/1/2013'hello#donotbefooled#1/1/2013hello'1/1/2013'hello" *)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement