1 | sS starToDotPlusRegexp(S s) { |
2 | int i = 0; |
3 | new StringBuffer buf; |
4 | while (i < l(s)) { |
5 | int j = smartIndexOf(s, "*", i); |
6 | buf.append(regexpQuote(substring(s, i, j))); |
7 | if (j >= l(s)) break; |
8 | buf.append(".+"); |
9 | i = j+3; |
10 | } |
11 | ret str(buf); |
12 | } |
Began life as a copy of #1032800
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1032801 |
Snippet name: | starToDotPlusRegexp |
Eternal ID of this version: | #1032801/1 |
Text MD5: | ce23d419b3c235631a45a3699c935ef0 |
Author: | stefan |
Category: | javax / regexp |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-06 07:47:05 |
Source code size: | 267 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 150 / 176 |
Referenced in: | [show references] |