Joke Collection Website - Public benefit messages - Can anyone help me parse the order number, payment amount, verification code and time using java regular expressions.
Can anyone help me parse the order number, payment amount, verification code and time using java regular expressions.
String str = "Dear user, for your last order of 8237, the payment amount is 0.01 yuan, and the verification code is 671906, sent at 15:08. Please enter it in time and do not disclose it. Any request is fraud. . ";
String reg = ".*The last order (.*).*The payment amount is ([^yuan]*)yuan.*Verification code (\\d+), ([\ \d:]+)发.*";
String a = str.replaceAll(reg,"$1");
String b = str.replaceAll(reg,"$2 ");
String c = str.replaceAll(reg,"$3");
String d = str.replaceAll(reg,"$4");
- Related articles
- Father's greetings
- Online dating sends text messages, doesn't call, doesn't answer.
- Where can I handle the Shenzhen Yaohao?
- Panlongcheng Wanda nucleic acid testing time
- How did the text message sent by 007999 know my name?
- What's the difference between imessages and SMS?
- Mobile phones always receive text messages about large loans. Is there any way to stop these messages?
- Can Shishi Rural Commercial Bank cancel its card in Jinjiang?
- How to distribute the fingers of Ya Qin with seven strings?
- How to send WeChat to wps of tablet?