sS starToDotPlusRegexp(S s) { int i = 0; new StringBuffer buf; while (i < l(s)) { int j = smartIndexOf(s, "*", i); buf.append(regexpQuote(substring(s, i, j))); if (j >= l(s)) break; buf.append(".+"); i = j+3; } ret str(buf); }
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: | 368 / 405 |
| Referenced in: | [show references] |