R
rdimayuga
I need a regex pattern that will match a string starting with zero or
one dot's. For example, ".string" and "string" should both match, but
something like "estring" should not match. So far, I've tried the
following:
\.*string
[.]{0,1}string
[\.]{0,1}string
[^a-zA-z0-9]{0,1}string
and none of these do the job 100%. I'm also wondering if there might
be a bug in the regex library i'm using - it's a 3rd party class that
somebody before me found and implemented. I have the source code for
the regexp class if necessary. Any help would be appreciated. Please
reply to (e-mail address removed).
one dot's. For example, ".string" and "string" should both match, but
something like "estring" should not match. So far, I've tried the
following:
\.*string
[.]{0,1}string
[\.]{0,1}string
[^a-zA-z0-9]{0,1}string
and none of these do the job 100%. I'm also wondering if there might
be a bug in the regex library i'm using - it's a 3rd party class that
somebody before me found and implemented. I have the source code for
the regexp class if necessary. Any help would be appreciated. Please
reply to (e-mail address removed).