What are some potential pitfalls to be aware of when using regular expressions in PHP for text extraction?

One potential pitfall when using regular expressions in PHP for text extraction is the use of greedy quantifiers, which can match more text than intended. To avoid this, use non-greedy quantifiers like `?` to ensure the regex matches the smallest possible text. Example:

$text = "Hello <strong>world</strong>";
preg_match('/<strong>(.*?)<\/strong>/', $text, $matches);
echo $matches[1]; // Output: world