Reputation: 627
I need to extract following from below string using REGEX, can anyone help
String = "[payment is made within [ 10 ] Business Days of its due date.]"
Output:
[ 10 ] Business Days
Upvotes: 0
Views: 63
Reputation: 1267
Please try this.
s/^\[payment is made within (\[ [0-9]* \]) Business Days.*$/\1 Business Days/
Upvotes: 1