之間凸顯我試圖從東西像提取模式{THIS_PATTERN}
類似如下:匹配資金和大括號
.intro-header {
padding-top: 50px; /* If you're making other pages, make sure there is 50px of padding to make sure the navbar doesn't overlap content! */
padding-bottom: 50px;
text-align: center;
color: #f8f8f8;
background: url(../img/{BG_IMAGE_0}) no-repeat center center;
background-size: cover;
}
在這種情況下,將{BG_IMAGE_0}
。
我想不出有什麼錯我的正則表達式:\{[A-Z_]*\}
我有一個regex101小提琴這裏: https://regex101.com/r/KF5Sz6/2
您錯過了「數字」'\ {[A-Z_ \ d] * \}' – strah