Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

5
LINES

< > BotCompany Repo | #1026769 - phraseToRegExp (with smart word boundaries)

JavaX fragment (include)

sS phraseToRegExp(S b) {
  ret (startsWithLetterOrDigit(b) ? "\\b" : "") +
    regexpQuote(b) + 
    (endsWithLetterOrDigit(b) ? "\\b" : "");
}

Author comment

Began life as a copy of #1026551

download  show line numbers  debug dex   

Travelled to 3 computer(s): mqqgnosmbjvj, tvejysmllsmz, xrpafgyirdlv

No comments. add comment

Snippet ID: #1026769
Snippet name: phraseToRegExp (with smart word boundaries)
Eternal ID of this version: #1026769/2
Text MD5: 7edc8bdb107113ecdbbbb0f6007773d7
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-01-21 15:00:45
Source code size: 147 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 6 / 10
Version history: 1 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1026769 & http://1026769.tinybrain.de