Method code for $parse_lib.possessive_reference()

[Turn off line numbering]
  1: arg str;
  2: var rx;
  3: 
  4: if ((rx = regexp(str, "^my$|^my +(.+)?"))) {
  5:     return ["me", (| rx[1] |) || ""];
  6: } else if ((rx = regexp(str, "^([^ ]+'s|[^ ]+s') *(.+)?"))) {
  7:     if (listlen(rx) == 1)
  8:         return 0;
  9:     return [substr(rx[1], 1, strlen(rx[1]) - 2), rx[2]];
 10: }
 11: return 0;

// Created 27-Mar-1995 as a part of ColdCore, see: @help Credit

Tlon