using regex validator against a field containing a 4 digit number (hour and minute of day), number is '1446', using ^[0-9][0-9][0-9][0-9] and it is failing. when i try the same in https://www.freeformatter.com/java-regex-tester.html#ad-output or in python 're' module, e.g. it works.
Dear @rob.zimmelman ,
I have no answer for your question, but dose this RegEx work?
[0-2][0-9][0-5][0-9]
I have proved this RegEx with following Java code:
import java.util.regex.Matcher;import java.util.regex.Pattern;public class Main {public static void main(String[] args) {Pattern pattern = Pattern.compile("[0-2][0-9][0-5][0-9]", Pattern.CASE_INSENSITIVE);Matcher matcher = pattern.matcher("1446");boolean matchFound = matcher.find();if(matchFound) {System.out.println("Match found");} else {System.out.println("Match not found");}}}
So long
Thomas
accomplished what i needed by making a sql query for GETDATE() which worked in the query comparison where the string comparison i was doing in regex with the string returned from an endpoint that returned 'hhmm' wasn't working
this is working doing validation on the 'summary' field.
It looks like you're new here. Sign in or register to get started.