I want to use a regex pattern to match any multiple-line text that starts with "abc" and ends with "xyz", I have two regex patterns to choose:
- ^abc(.|\n|\r)*xyz$
- ^abc[\s\S]*xyz$
Are they two equivalent to each other except for performance?
Which is better and why?