Quantcast
Channel: Pattern.Split doesn't behave as I've expected - Salesforce Stack Exchange
Browsing index pages (3 articles)
↧

Image may be NSFW.
Clik here to view.

Pattern.Split doesn't behave as I've expected

Full doc on Pattern Class: Documentation Pattern ClassUse case :So, whenever a Task is Created due to email to salesforce, I need to check if that emails content Body included one or more links from a...

View Article


Answer by Adrian Larson for Pattern.Split doesn't behave as I've expected

You do indeed have a misunderstanding here. What the tool you're using does is find each matching group, which is more like this script instead:Pattern urlPattern = Pattern.compile('http.*\\S');String...

View Article


Answer by Novarg for Pattern.Split doesn't behave as I've expected

Your regex(http.*\\S') will match anything that starts with http and it will match till the end of line(combination of .* and \S). .* will match ANY character and \S will match any non-space...

View Article
Browsing index pages (3 articles)


Latest Images