The invention discloses a method and system for extracting webpage content, and the method comprises the following steps of S1, carrying out content extraction processing based on regular expression matching on a webpage, executing a step S4 when the extraction is judged to be successful, and otherwise, continuing to execute the step S2; s2, performing content extraction processing based on the CSS style on the webpage, executing the step S4 when the extraction is judged to be successful, otherwise, continuing to execute the step S3; s3, performing content extraction processing based on XPathmatching on the webpage; s4, outputting an extraction result. According to the invention, the regular expression, the CSS style and the XPath are combined in sequence to extract the webpage content, the webpage content extraction can be achieved at the fastest speed, and by combining three extraction modes, the accuracy of the extracted webpage content is greatly improved, an effective and accurate extraction result can be provided, and the webpage content extraction method and system can be widely applied to the field of webpage information processing.