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

5
LINES

< > BotCompany Repo | #1031301 // regexpExtractGroup - return first group of first match

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2835L/17K).

sS regexpExtractGroup(S pat, S s) {
  if (s == null) null;
  Matcher m = regexpMatcher(pat, s);
  ret m.find() ? m.group(1) : null;
}

Author comment

Began life as a copy of #1016487

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031301
Snippet name: regexpExtractGroup - return first group of first match
Eternal ID of this version: #1031301/1
Text MD5: 5483898a872855f9f958fad29236b8d6
Transpilation MD5: a3b06a422bc748bf8301fd988fda3b09
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-04 18:10:00
Source code size: 137 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 141 / 204
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)