Alcatech.BPM.Studio.Pro.4.91-H2O for sale
Alcatech.BPM.Studio.Pro.4.91-H2O serial keyQ:
How can I validate the following regular expression?
I am trying to validate the following regular expression for Regex.IsMatch()
^(?:1)$
Example:
1
abc
Should be valid.
2
abc
cba
Should be valid.
Should not be valid
Any ideas?
A:
Assuming your input is of type string, you can use the following regular expression:
^1+$
Test with following snippet:
Regex regex = new Regex("^1+$");
var valid = regex.IsMatch("1");
var invalid = regex.IsMatch("ab");
var notMatch = regex.IsMatch("2");
var notValid = regex.IsMatch("abc");
Output:
valid : false
invalid : true
notMatch : false
notValid : true
Explanation:
^ Asserts that we are at the start of the string.
$ Asserts that we are at the end of the string.
1+ Matches one or more occurrences of the character 1.
$ Asserts that we are at the end of the string.
Note: This regular expression also works for null input.
'use strict';
module.exports.definition = {
set: function (v) {
this._setProperty('-webkit-page-break-after', v);
},
get: function () {
return this.getPropertyValue('-webkit-page-break-after');
},
enumerable: true,
configurable: true
};
Three new statues of Colin Kaepernick, Terrell Owens and Carlos Santana, along with a statue of a famous Native American activist and a tombstone memorializing a young boy who was killed by a police officer have been unveiled in the Bay Area city of Richmond. ac619d1d87
Related links:
Comentários