I have an NSArray of lines (objective-c iphone), and I’m trying to find the line which starts with a number, followed by a dot and a space, but can have any number of spaces (including none) before it, and have any text following it eg:
1. random text
2. text random
3.
what regular expression would I use to get this? (I’m trying to learn it, and I needed the above expression anyway, so I thought I’d use it as an example)
With C#:
It doesn’t check for the presence of something after the
., so this is legal:If you delete the
@and escape the\it should work with other languages (it is pretty “down-to-earth” as RegExpes go)