package main
import (
"fmt"
"regexp"
)
func main() {
text := "`От:` <@317989885321674753>\n`На:` <@163995016027439106>\n`Причина:` <@!163995016027439106>"
re := regexp.MustCompile(`\<\@\!?(\d{18})\>`)
matches := re.FindAllStringSubmatch(text, -1)
for _, match := range matches {
if len(match) > 1 {
fmt.Println(match[1])
}
}
}
func checkStr(a string, b string, c []string) {
re := regexp.MustCompile(regexp.QuoteMeta(a) + `(\d+)` + regexp.QuoteMeta(b))
for _, str := range c {
fmt.Println(re.FindString(str))
}
}
/^.*\?/
\([^\(]*\|[^\)]*\)
(?: )
\{[^\}]*\}
var rl=/[0-9]/g;
console.log(rl.test(2));
rl.lastIndex = 0;
console.log(rl.test(2));
rl.lastIndex = 0;
console.log(rl.test(2));
console.log(
a
.split(/\r?\n/)
.filter(function(line) {
return line.match(/^[^#]/);
})
);