static String find(String pattern, String text) { Matcher matcher = Pattern.compile(pattern).matcher(text); if (matcher.find()) return matcher.group(1); return null; } static <A> A find(Collection<A> c, O... data) { for (A x : c) if (checkFields(x, data)) ret x; ret null; }
Began life as a copy of #2000489
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ekrmjmnbrukm, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1000734 |
Snippet name: | find - find object in collection with matching fields / find in text |
Eternal ID of this version: | #1000734/1 |
Text MD5: | bbfcba858ced2ca7e41a485ec46717ae |
Author: | stefan |
Category: | |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-05-21 02:59:56 |
Source code size: | 311 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 783 / 2000 |
Referenced in: | #1002427 - Accellerating 629 (SPIKE) #1006654 - Standard functions list 2 (LIVE, continuation of #761) #3000382 - Answer for ferdie (>> t = 1, f = 0) #3000383 - Answer for funkoverflow (>> t=1, f=0 okay) |