I need regular expression (C#) for symbol * – it should match any number of any characters, but it can contain only one space. I tried following, but its not working:
@".*[^[\t\0x0020]^[\t\0x0020]+].*"
@".*[^\s^\s+].*"
@".*[^\s\s+].*"
any way how to create regex like this?
Example: If user write expression MTN*-* it has to match for example
MTN3111-0000
but not
MTN311100 MTN3111-0000
You could use this expression:
It would match any number of any characters, but allow at most one space.