Loading ...
Sorry, an error occurred while loading the content.

15977Re: Brooding about ^$GetDocMatchAll

Expand Messages
  • Sheri
    Jan 16, 2007
      --- In ntb-clips@yahoogroups.com, "jonas_ramus" <flo.gehrke@...> wrote:

      > ^!IfSame "^%Sub%" "Substrings" Next Else Skip_2
      > ^!replace "(?<=(.{^%Char%}))(^%Search%)(?=(.{^%Char%}))" >> "=1=$1=
      > $2 = $3 \r\n=4=" rwais
      > ^!Goto Skip
      > ^!replace "(?<=(.{^%Char%}))\b(^%Search%)\b(?=(.{^%char%}))"
      > >> "=1=$1= $2 = $3 =4=" rwais

      Hi Flo,

      There should only be one difference between the two replace commands
      (inclusion or exclusion of the \b's) but the second one is missing the
      critical \r\n

      You also might want to close up the spaces in the replacement clause,
      they will create extra spaces in the output. $2 is the search term.
      $1$2$3 is the search word in context. Everything else, except the =1=
      at the beginning and the \r\n=4= at the end is adding spaces and equal
      signs to the output.

      Hope this helps,
    • Show all 35 messages in this topic