标签: regex
我需要使用REGEX从下面的字符串中提取以下内容,任何人都可以帮忙
String = "[payment is made within [ 10 ] Business Days of its due date.]"
输出:
[ 10 ] Business Days
答案 0 :(得分:1)
请尝试这个。
s/^\[payment is made within (\[ [0-9]* \]) Business Days.*$/\1 Business Days/