Hoogle Search
Within LTS Haskell 24.50 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
searchReplaceFirst :: IsRegex re s => SearchReplace re s -> s -> sregex Text.RE.Tools search and replace the first occurrence only (if any) in the input text e.g., to prefix the first string of four hex digits in the imput text, if any, with 0x:
searchReplaceFirst [ed|[0-9A-Fa-f]{4}///0x$0|]searchReplaceFirst :: IsRegex re s => SearchReplace re s -> s -> sregex Text.RE.Tools.Edit search and replace the first occurrence only (if any) in the input text e.g., to prefix the first string of four hex digits in the imput text, if any, with 0x:
searchReplaceFirst [ed|[0-9A-Fa-f]{4}///0x$0|]searchReplaceFirst :: IsRegex re s => SearchReplace re s -> s -> sregex Text.RE.Tools.Find search and replace the first occurrence only (if any) in the input text e.g., to prefix the first string of four hex digits in the imput text, if any, with 0x:
searchReplaceFirst [ed|[0-9A-Fa-f]{4}///0x$0|]searchReplaceFirst :: IsRegex re s => SearchReplace re s -> s -> sregex Text.RE.Tools.Grep search and replace the first occurrence only (if any) in the input text e.g., to prefix the first string of four hex digits in the imput text, if any, with 0x:
searchReplaceFirst [ed|[0-9A-Fa-f]{4}///0x$0|]searchReplaceFirst :: IsRegex re s => SearchReplace re s -> s -> sregex Text.RE.Tools.IsRegex search and replace the first occurrence only (if any) in the input text e.g., to prefix the first string of four hex digits in the imput text, if any, with 0x:
searchReplaceFirst [ed|[0-9A-Fa-f]{4}///0x$0|]searchReplaceFirst :: IsRegex re s => SearchReplace re s -> s -> sregex Text.RE.Tools.Lex search and replace the first occurrence only (if any) in the input text e.g., to prefix the first string of four hex digits in the imput text, if any, with 0x:
searchReplaceFirst [ed|[0-9A-Fa-f]{4}///0x$0|]searchReplaceFirst :: IsRegex re s => SearchReplace re s -> s -> sregex Text.RE.Tools.Sed search and replace the first occurrence only (if any) in the input text e.g., to prefix the first string of four hex digits in the imput text, if any, with 0x:
searchReplaceFirst [ed|[0-9A-Fa-f]{4}///0x$0|]findFirstInfix :: RE s a -> [s] -> Maybe ([s], a, [s])regex-applicative Text.Regex.Applicative Find the leftmost substring that is matched by the regular expression. Otherwise behaves like findFirstPrefix. Returns the result together with the prefix and suffix of the string surrounding the match.
findFirstPrefix :: RE s a -> [s] -> Maybe (a, [s])regex-applicative Text.Regex.Applicative Find a string prefix which is matched by the regular expression. Of all matching prefixes, pick one using left bias (prefer the left part of <|> to the right part) and greediness. This is the match which a backtracking engine (such as Perl's one) would find first. If match is found, the rest of the input is also returned. See also findFirstPrefixWithUncons, of which this is a special case. Examples:
Text.Regex.Applicative> findFirstPrefix ("a" <|> "ab") "abc" Just ("a","bc") Text.Regex.Applicative> findFirstPrefix ("ab" <|> "a") "abc" Just ("ab","c") Text.Regex.Applicative> findFirstPrefix "bc" "abc" NothingfindFirstPrefixWithUncons :: (ss -> Maybe (s, ss)) -> RE s a -> ss -> Maybe (a, ss)regex-applicative Text.Regex.Applicative Find the first prefix, with the given uncons function.