Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [matcher]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1
votes
1answer
60 views

Regex in Pattern.compile to split BillingStreet into custom street and house number field

I want to split BillingStreet into a custom Street__c and HouseNumber__c. According to what I have read so far online, I need to: Instantiate a new Pattern object //Pattern 'Test Street 123' OR '123 ...
-2
votes
1answer
36 views

Is it possible to do a “reverse regex” pattern match?

I have the following code: if(PATTERN_A.matcher(someValue).matches()){ model = MODEL_A; } else if(PATTERN_B.matcher(someValue).matches()){ model = MODEL_B; } else if(PATTERN_C.matcher(...
1
vote
1answer
35 views

Cannot Find Duplicate Management in Lightning

I am having difficulty managing matching rules in SF Lightning because I cannot get past step one of all the guides I have found. When I type "match" or "dup" into the quick find box, nothing comes up....
2
votes
1answer
229 views

Regex having issues in Apex

I found a Regex which retrieves the Parent domain from a URL. When I tried using the same Regex Expression in Apex using Pattern and Matcher, it's giving me an error of: Illegal string literal: ...
0
votes
0answers
168 views

Cross Field Matching Rule - Duplicate Rules

On Contact record we have two email fields - Email and Personal_Email__c. We want to identify records as matches if any of the email address fields match any existing email addresses in those fields ...
0
votes
1answer
358 views

patern and matcher not working

I am using regex to find line which starts with 'aaaa' pattern myPattern = pattern.compile('^(aaaa)\b.*'); String a = 'aaaa,777,ttttt,rrrrrr'; a += '\n' + 'tttttt,ttttt,0000'; matcher myMatcher = ...
5
votes
2answers
3k views

Regex Help- Escaping Characters And Matcher Method

I have a string: allPunctuation = '~!@#$%^*()_+|}{":?><`=;/.,][-\'\\'; This string contains APEX's way of escaping characters so I can include the ' and the \ characters. When I pass this ...
0
votes
1answer
786 views

Duplicate Rule Issue when differentiating Record Types

We have a Custom Object 'Target' In our application.It has total 5 record types and each record type has respective duplicate rule. The purpose of the the custom object is to set the target for ...
1
vote
1answer
1k views

Find a Particular Substring using Regex

I am trying my hands on Email Services, am stuck at a place where I need to create a regex. I want to find all substring which looks like "PIKA-170510-115943". Here is my code. String str='Strating ...
2
votes
1answer
414 views

How to query or report on Duplicates Match

I am using Duplicate Management; Matching Rules; Duplicate Rules from Salesforce, standard out of the box. This helps a lot to stop the bleeding and limit the manual duplicate generation. I notice ...
0
votes
2answers
879 views

Regex - matching only a single character

I need to find a match over the following text and I need to detect only one single under score by using REGEX: Text: network_ip__c Result: true Text: Opportunity__c Result: false How can I ...
2
votes
2answers
1k views

regular expression problem (Pattern/Matcher)

I need to find specific word on a string using regular expression. rules : before that word, I must not have a letter, a number or an underscore. this word must be not followed by a letter, a number ...
5
votes
2answers
408 views

Find if a word from a list exist in a string

I am trying to find if a sentence contains at least 1 word from a different list of words. I am able to do this like below code, however my concern goes that the "theSentence" is a string that is ...
0
votes
1answer
104 views

How to filter out LF and CR from values in the cells of CSV file

We have an email service which accepts CSV attachment and has process its values and insert it into the objects. CsvReader class stop processing lines from CSV when there is "Line Feed" present inside ...
5
votes
2answers
620 views

Apex regex and non-capturing groups

I have a regular expression that I want to use to pull ID's out of a JSON string. The expression itself appears to work fine based on the data I've given it, so that's good. ^(?:.*)(?:{"id":)(\d+)(?:...
3
votes
1answer
526 views

Regex Pattern to Isolate Multiple Double Quoted Terms

The pattern below allows me to isolate a single term that is enclosed in double quotes. However i'd like to be able to isolate multiple terms that are double quoted and separate them if possible. ...
1
vote
1answer
292 views

How to split String Using REGEXP or Using Pattern class

This is My String 14-Mar-16,RTRDTG78BGXPBE3H,D-Link DIR-600M Wireless N150 Home Router,10-Apr-16, SECEBH7HZMKZMG3B,Kaspersky Internet Security 2016 1 PC 1 Year I want to split this string Where ever ...
1
vote
2answers
3k views

Apex regex to get html child tag and its content? [closed]

I have below HTML tag and i need to extract TAG child tag and its element. <h3 class="large lheight20 margintop10"> <a href="https://google.com" class="marginright5 link linkWithHash ...
4
votes
1answer
740 views

Regex: Make Dot Match Newline?

I use Rubular to test my regular expressions, when I need them. I am having a bit of trouble crafting an expression that will work for me. For reference, I am trying to match multiple substrings in ...
2
votes
1answer
578 views

Regex Match Count and Scan

Is there a way that I could print the contents of each regex match within a loop? Say I have the following pattern: 1xxxx2xxxx3 If I have a matcher that is (?mi)(\d)...How could I iterate through ...
2
votes
1answer
5k views

Regular Expression for words with spaces

I want to check for the following strings using regExpression: 1) Main-xxxxx-Accepted 2) Main-xxx xxx-Accepted I used the below String regEx = 'Main-[aA-zZ-]*-Accepted'; Pattern.matches(regEx,'...
1
vote
1answer
335 views

Regex Pattern/Matcher optional html attributes

So I am trying to make a pattern matcher that would read a block of html and identify the labels and ids of certain fields on the page. I am trying to find a way to read the label tag and parse ...