Hi,
Any regex experts out there, been working on this, but wondering if anyone has idea to creating this...
A string value and return a boolean indicating if the string matches the pattern
The input can consist of the following values: a-z, \, _, %.
_ in the pattern represents any character
% represents 0 or more characters
\ can be used to escape the next character to take away any special meaning.
For example, patterns :
“a_c” matches “abc” but not “abcd”
“ab%d” matches “abdgdgdgd” or “abd” but not “abbbde”
“ab\%” matches “ab%” but not “abcd”
“__%” matches “ab” and “abcd” but not “a”
Thanks
Any regex experts out there, been working on this, but wondering if anyone has idea to creating this...
A string value and return a boolean indicating if the string matches the pattern
The input can consist of the following values: a-z, \, _, %.
_ in the pattern represents any character
% represents 0 or more characters
\ can be used to escape the next character to take away any special meaning.
For example, patterns :
“a_c” matches “abc” but not “abcd”
“ab%d” matches “abdgdgdgd” or “abd” but not “abbbde”
“ab\%” matches “ab%” but not “abcd”
“__%” matches “ab” and “abcd” but not “a”
Thanks