Hey everyone,
I'm working on a project in PHP where I need to find and verify Roman numerals within a given text string. I know that Roman numerals can range from the basic ones like I, V, X, L, C, D, M, to more complex ones like IV, IX, XL, XC, CD, CM, and so on.
I've been trying to come up with a regular expression to capture these Roman numerals, but I'm having some trouble. Can anyone help me out with this?

Hey folks,
I stumbled upon this thread and thought I'd share a different approach I used to identify Roman numerals in PHP. Instead of relying on regular expressions, I found it more effective to utilize the `IntlChar` class introduced in PHP 7.
Here's a code snippet to demonstrate how you can leverage the `IntlChar` class to find Roman numerals:
Using the `IntlChar` class allows you to accurately identify Roman numerals without relying on regular expressions or manually defining patterns. It checks for characters with the DOUBLE_WIDTH property, which effectively captures Roman numerals and excludes other numeric characters.
Give it a try and let me know if it works for you or if you come across any issues. Happy coding!