资 源 简 介
Just what is a regular expression, anyway?
Take the tutorial to get the long answer. The short answer is that a regular expression
is a compact way of describing complex patterns in texts. You can use them to search
for patterns and, once found, to modify the patterns in complex ways. You can also use
them to launch programmatic actions that depend on patterns.
A tongue-in-cheek comment by programmers is worth thinking about: "Sometimes you
have a programming problem and it seems like the best solution is to use regular
expressions now you have two problems." Regular expressions are amazingly
powerful and deeply expressive. That is the very reason writing them is just as
error-prone as writing any other complex programming code. It is always better to
solve a genuinely simple problem in a simple way when you go beyond simple, think
about regular expressions.
Tutorial: Using regular expressions