Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/egonelbre/exp
/ RegexCount
Function
RegexCount
characters/main.go:21–23 ·
view source on GitHub ↗
(s string)
Source
from the content-addressed store, hash-verified
19
var
rxCount = regexp.MustCompile(`\PM\pM*|.`)
20
21
func
RegexCount(s string) int {
22
return
len(rxCount.FindAllString(s, -1))
23
}
24
25
func
NormalizedCount(form norm.Form, s string) int {
26
var
i norm.Iter
Callers
1
main
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected