Find a regular expression Replacement. how can this problem be solved?
Source: Internet
Author: User
Find a regular expression replacement .. a-1 content to be deleted B-1 content to be retained A-2 content to be deleted B-2 content to be retained A-4 content to be deleted B-4 content to be retained A-3 content to be deleted B-3 content to be retained a-8 content B-8 to delete... content to be retained A-n the content to be deleted B-n where n calculates A regular replacement ..
A-1 content B-1 to delete
Content to be retained
A-2 content B-2 to delete
Content to be retained
A-4 content B-4 to delete
Content to be retained
A-3 content B-3 to delete
Content to be retained
A-8 content B-8 to delete
.
.
.
Content to be retained
A-n content to be deleted B-n
Where n = a positive integer, the content will contain html tags, line breaks, and so on...
Please advise me.
------ Solution --------------------
/A-\ d .*? B-\ d/
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service