Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 1
    How to Use Regular Expressions in Visual Basic Commented Nov 17, 2013 at 15:04
  • Will the hyphen come first or the number? Commented Nov 17, 2013 at 15:05
  • 1
    Can you please include some of the words in your question ? Commented Nov 17, 2013 at 15:10
  • I am not sure what exactly are you asking. I had to re-read it many times but every time I understood something else so I had to delete my answer. Can you please give some examples as @Sniffer requested? Commented Nov 17, 2013 at 15:45
  • I am sorry if I wasn't clear enough. My pattern has the following format "AA2-11". I want to match that whole string, that is why I can't use rx.pattern = "[a-z][a-z][0-9]-[0-9][0-9]" because that will hit a match if you have for example "AA2-11-4", while I just want "AA2-11". Commented Nov 17, 2013 at 15:49