Skip to main content

Questions tagged [regular-expressions]

A regular expression (abbreviated regex or regexp) is a sequence of characters that forms a search pattern, mainly for use in pattern matching with strings, or string matching, i.e. "find and replace"-like operations.

0 votes
1 answer
262 views

I have a lightning-record-edit-form with a lightning-input-field that is connected to a rich text field. I have the following on change handler for the field: handleBodyChange() { let target = this....
user avatar
2 votes
2 answers
174 views

I am on a mission to extract URLs from all the emails unfortunately I am getting stuck on regex with SSJS. My plan is to call the Content Builder API (/asset/v1/content/assets?$filter=id=12345)for the ...
weliott's user avatar
  • 305
0 votes
1 answer
642 views

I have created following validation rule, but struggling how to add to it to also allow blank (space) values. AND(NOT(ISBLANK(field__c)), OR( LEN(field__c) > 20, NOT(REGEX(field__c,"^[0-9]+$&...
Angela 's user avatar
0 votes
1 answer
395 views

I am currently writing a basic search users UI which can search email of users and return based on a search string and bolds the matching chars in the result. I achieve this by adding tags in JS and ...
Dillon P's user avatar
0 votes
1 answer
331 views

Is there a way to divide/simplify a pattern match to avoid getting this error ? Sometimes the Json String that I'm trying to match is way too long and it causes errors on a batch a class. I am ...
peepoCode's user avatar
0 votes
1 answer
856 views

I have been using regex pattern with 'message-when-pattern-mismatch' error message for some lightning input fields in LWC component. regex1 is like : pattern="^[A-Za-z-.' ]*" [it should ...
user10057771's user avatar
0 votes
0 answers
258 views

The Validation Rule listed below is supposed to fire if the below criteria is not met: For Sales Orders, enter between 6-8 digits OR For Delivery IDs, enter 10 digits. Users may enter multiple values ...
Adnan's user avatar
  • 103
3 votes
2 answers
735 views

I am able to use the regex formula string directly in the validation rule and its working fine when I tested it. AND( CONTAINS(RecordType.Name, 'International_Lead'), !REGEX(Phone, '^(\\+)\\d{...
Rival's user avatar
  • 595
-1 votes
1 answer
665 views

I am using a screen flow to capture information that will create multiple records, and one of the fields I need to capture is a Phone field. Depending on a value set previously (Country), the phone ...
Lara Wasowski's user avatar
0 votes
1 answer
433 views

I am trying to limit my input number field to exactly match the field values which are 16 digits to 2 decimal digits. Also I want to prevent user from putting something different into the field like a ...
YCS's user avatar
  • 37
-2 votes
2 answers
109 views

I have the following in Javascript and are trying to do this in apex but having issues .replace(/\s+/g, '-') // Replace spaces with - .replace(/&/g, '-and-') // Replace & with 'and' .replace(/[...
Thomas's user avatar
  • 2,320
-1 votes
2 answers
415 views

I'm facing an email validation challenge for my project. I want to throw an error if any of the following scenarios are met: The email has numbers at the end, like '[email protected]'. The email ...
HSD's user avatar
  • 1
-2 votes
1 answer
2k views

I have a regular expression which requires emails to be in [email protected] format. I want to tweak to be [email protected] OR [email protected] where 'i' would be ...
Aron Schor's user avatar
0 votes
1 answer
312 views

Is it possible to include in a validation rule for a text field to only allow X amount of commas? I am trying to limit the amount of emails that are currently seperated by a comma.
needhelpplease's user avatar
0 votes
1 answer
183 views

I'm looking to basically redact some information in our Salesforce environment, across various fields and using different REGEX patterns. For example, in Case.Description, I have the following details:...
Nat's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
24