src/Edit.c
void EditUpdateIndicators(DocPos startPos, DocPos endPos, bool bClearOnly)
{
  if (bClearOnly) {
    _ClearIndicatorInRange(INDIC_NP3_HYPERLINK, INDIC_NP3_HYPERLINK_U, startPos, endPos);
    _ClearIndicatorInRange(INDIC_NP3_COLOR_DEF, INDIC_NP3_COLOR_DWELL, startPos, endPos);
    return;
  }
  if (Settings.HyperlinkHotspot) 
  {
    // https://mathiasbynens.be/demo/url-regex : @stephenhay
    //static const char* pUrlRegEx = "\\b(?:(?:https?|ftp|file)://|www\\.|ftp\\.)[^\\s/$.?#].[^\\s]*";

    static const char* pUrlRegEx = "\\b(?:(?:https?|ftp|file)://|www\\.|ftp\\.)"
      "(?:\\([-a-z\\u00a1-\\uffff0-9+&@#/%=~_|$?!:,.]*\\)|[-a-z\\u00a1-\\uffff0-9+&@#/%=~_|$?!:,.])*"
      "(?:\\([-a-z\\u00a1-\\uffff0-9+&@#/%=~_|$?!:,.]*\\)|[a-z\\u00a1-\\uffff0-9+&@#/%=~_|$])";

    _UpdateIndicators(INDIC_NP3_HYPERLINK, INDIC_NP3_HYPERLINK_U, pUrlRegEx, startPos, endPos);
  }
  else {
    _ClearIndicatorInRange(INDIC_NP3_HYPERLINK, INDIC_NP3_HYPERLINK_U, startPos, endPos);
  }
  
  if (Settings.ColorDefHotspot) 
  {
    static const char* pColorRegEx = "#([0-9a-fA-F]){6}";
    _UpdateIndicators(INDIC_NP3_COLOR_DEF, -1, pColorRegEx, startPos, endPos);
  }
  else {
    _ClearIndicatorInRange(INDIC_NP3_COLOR_DEF, INDIC_NP3_COLOR_DWELL, startPos, endPos);
  }

  EditDoStyling(startPos, endPos);
}
//=============================================================================
//
//  EditUpdateIndicators()
//  - Find and mark all URL hot-spots
//  - Find and mark all COLOR refs (#RRGGBB)
//

EditUpdateIndicators()
Find and mark all URL hot-spots
Find and mark all COLOR refs (#RRGGBB)
EditUpdateIndicators () Find and mark all URL hot - spots Find and mark all COLOR refs ( #RRGGBB )
void EditUpdateIndicators(DocPos startPos, DocPos endPos, bool bClearOnly)
{
  if (bClearOnly) {
    _ClearIndicatorInRange(INDIC_NP3_HYPERLINK, INDIC_NP3_HYPERLINK_U, startPos, endPos);
    _ClearIndicatorInRange(INDIC_NP3_COLOR_DEF, INDIC_NP3_COLOR_DWELL, startPos, endPos);
    return;
  }
  if (Settings.HyperlinkHotspot) 
  {
    static const char* pUrlRegEx = "\\b(?:(?:https?|ftp|file)://|www\\.|ftp\\.)"
      "(?:\\([-a-z\\u00a1-\\uffff0-9+&@#/%=~_|$?!:,.]*\\)|[-a-z\\u00a1-\\uffff0-9+&@#/%=~_|$?!:,.])*"
      "(?:\\([-a-z\\u00a1-\\uffff0-9+&@#/%=~_|$?!:,.]*\\)|[a-z\\u00a1-\\uffff0-9+&@#/%=~_|$])";
    _UpdateIndicators(INDIC_NP3_HYPERLINK, INDIC_NP3_HYPERLINK_U, pUrlRegEx, startPos, endPos);
  }
  else {
    _ClearIndicatorInRange(INDIC_NP3_HYPERLINK, INDIC_NP3_HYPERLINK_U, startPos, endPos);
  }
  if (Settings.ColorDefHotspot) 
  {
    static const char* pColorRegEx = "#([0-9a-fA-F]){6}";
    _UpdateIndicators(INDIC_NP3_COLOR_DEF, -1, pColorRegEx, startPos, endPos);
  }
  else {
    _ClearIndicatorInRange(INDIC_NP3_COLOR_DEF, INDIC_NP3_COLOR_DWELL, startPos, endPos);
  }
  EditDoStyling(startPos, endPos);
}
void EditUpdateIndicators ( DocPos startPos , DocPos endPos , bool bClearOnly ) { if ( bClearOnly ) { _ClearIndicatorInRange ( INDIC_NP3_HYPERLINK , INDIC_NP3_HYPERLINK_U , startPos , endPos ) ; _ClearIndicatorInRange ( INDIC_NP3_COLOR_DEF , INDIC_NP3_COLOR_DWELL , startPos , endPos ) ; return ; } if ( Settings . HyperlinkHotspot ) { static const char * pUrlRegEx = " \\ \\ \\ " " \\ \\ \\ \\ \\ \\ " " \\ \\ \\ \\ \\ \\ " ; _UpdateIndicators ( INDIC_NP3_HYPERLINK , INDIC_NP3_HYPERLINK_U , pUrlRegEx , startPos , endPos ) ; } else { _ClearIndicatorInRange ( INDIC_NP3_HYPERLINK , INDIC_NP3_HYPERLINK_U , startPos , endPos ) ; } if ( Settings . ColorDefHotspot ) { static const char * pColorRegEx = " " ; _UpdateIndicators ( INDIC_NP3_COLOR_DEF , -1 , pColorRegEx , startPos , endPos ) ; } else { _ClearIndicatorInRange ( INDIC_NP3_COLOR_DEF , INDIC_NP3_COLOR_DWELL , startPos , endPos ) ; } EditDoStyling ( startPos , endPos ) ; }
EditUpdateIndicators()
 Find and mark all URL hot-spots
 Find and mark all COLOR refs (#RRGGBB)
EditUpdateIndicators () Find and mark all URL hot - spots Find and mark all COLOR refs ( #RRGGBB )
// https://mathiasbynens.be/demo/url-regex : @stephenhay
 //static const char* pUrlRegEx = "\\b(?:(?:https?|ftp|file)://|www\\.|ftp\\.)[^\\s/$.?#].[^\\s]*";
