Skip to main content
Solved

How to pull specific text out of a string that could have multiple formats

  • June 10, 2024
  • 2 replies
  • 33 views

Forum|alt.badge.img+5

I have a URL field that I need to grab specific text from (in bold). Does anyone know if there is a formula I could use to easily grab just the string in bold without pulling in additional data from the 3 possible formats?

Here are the multiple formats that the URL could be in:

Sample format 1:

Sincere thank you in advance for anyone who takes the time to look into this and provide any suggestions!

Best answer by j-hugg-ins

Hi Brooke. If the pattern of the UDID you are extracting is consistent you can use a regular expression in your formula field like this:

REGEX_EXTRACT( {url}, "[A-F0-9]{8}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{12}" )

 I tested it on all 3 of your examples and it works.

2 replies

j-hugg-ins
Forum|alt.badge.img+9
  • Participating Frequently
  • Answer
  • June 16, 2024

Hi Brooke. If the pattern of the UDID you are extracting is consistent you can use a regular expression in your formula field like this:

REGEX_EXTRACT( {url}, "[A-F0-9]{8}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{12}" )

 I tested it on all 3 of your examples and it works.


Forum|alt.badge.img+5
  • Author
  • New Participant
  • June 17, 2024

Hi Brooke. If the pattern of the UDID you are extracting is consistent you can use a regular expression in your formula field like this:

REGEX_EXTRACT( {url}, "[A-F0-9]{8}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{12}" )

 I tested it on all 3 of your examples and it works.


This worked perfectly! Thanks so much for your help with this!