我想提取“緩存”之后的數(shù)字(可以是任何非負(fù)整數(shù)),而不是“total_cache”之后的數(shù)字。我需要能夠在單個(gè)正則表達(dá)式中執(zhí)行此操作,并且不能使用前瞻或后視。(我在 go 中這樣做,這似乎與這里的測試儀基本兼容:http : //regexpal.com/)cache 5764452352rss 2929250304rss_huge 0mapped_file 283906048pgpgin 19709097pgpgout 17586611pgfault 39612525pgmajfault 3757inactive_anon 160579584active_anon 3931484160inactive_file 3560427520active_file 1040818176unevictable 49152hierarchical_memory_limit 9223372036854775807total_cache 5764452352total_rss 2929250304total_rss_huge 0total_mapped_file 283906048total_pgpgin 19709097total_pgpgout 17586611total_pgfault 39612525total_pgmajfault 3757total_inactive_anon 160579584total_active_anon 3931484160total_inactive_file 3560427520total_active_file 1040818176total_unevictable 49152
如何使用正則表達(dá)式提取此子字符串?
函數(shù)式編程
2021-07-27 17:42:36