This content from the SAP Concur Community was machine translated for your convenience. SAP does not provide any guarantee regarding the correctness or completeness of this machine translated text. View original text custom.banner_survey_translated_text
- Mute
- Subscribe
- Bookmark
- Report Inappropriate Content
Regular Expression
Dear all,
is there a regular expression that allow me to force the user to fill in at least one fixed words? Example: Comment field, the employee has to insert at leat the value "AAAAAA" or "BBBBB" but also could add other free text.
Thanks.
Lorenzo
Solved! Go to Solution.
This content from the SAP Concur Community was machine translated for your convenience. SAP does not provide any guarantee regarding the correctness or completeness of this machine translated text. View original text custom.banner_survey_translated_text
- Mute
- Subscribe
- Bookmark
- Report Inappropriate Content
Hi @lmaggiulli ,
1. What are those fixed words that are allowed to use?
2. Also, just wondering, if you want to allow them to enter anything then what is the purpose of adding field validation?
Try below:
Regular Expression - ^(AAAAAA|BBBBBB) - .*$
Note -
- (AAAAAA|BBBBBB) - Matches either "AAAAAA" or "BBBBBB". Replace this with your fixed words.
- | is the OR operator, so it matches either of the two values.
- - - Ensures that there is a hyphen after "AAAAAA" or "BBBBBB".
- .* - Matches any characters (zero or more) after the hyphen (i.e., free text).
Testing Result:
If this answers your query, then please mark solution as accepted.
Regards,
Pooja
This content from the SAP Concur Community was machine translated for your convenience. SAP does not provide any guarantee regarding the correctness or completeness of this machine translated text. View original text custom.banner_survey_translated_text
- Mute
- Subscribe
- Bookmark
- Report Inappropriate Content
Hi @lmaggiulli ,
1. What are those fixed words that are allowed to use?
2. Also, just wondering, if you want to allow them to enter anything then what is the purpose of adding field validation?
Try below:
Regular Expression - ^(AAAAAA|BBBBBB) - .*$
Note -
- (AAAAAA|BBBBBB) - Matches either "AAAAAA" or "BBBBBB". Replace this with your fixed words.
- | is the OR operator, so it matches either of the two values.
- - - Ensures that there is a hyphen after "AAAAAA" or "BBBBBB".
- .* - Matches any characters (zero or more) after the hyphen (i.e., free text).
Testing Result:
If this answers your query, then please mark solution as accepted.
Regards,
Pooja