Skip to main content
Question

Regex to extract string


katt
Supporter
Forum|alt.badge.img+12
  • Supporter

When I am using a regex in a string searcher, the output is as expected. When I am using the same regex as @FindRegularExpression in the Attribute Manager, my script always fails. What do I need to modify in the Attribute Manager regex? Thanks21

3 replies

dustin
Influencer
Forum|alt.badge.img+30
  • Influencer
  • August 16, 2023

@FindRegularExpression returns the index of the match. @SubstringRegularExpression will return the match itself, similar to the StringSearcher.


katt
Supporter
Forum|alt.badge.img+12
  • Author
  • Supporter
  • August 16, 2023
dustin wrote:

@FindRegularExpression returns the index of the match. @SubstringRegularExpression will return the match itself, similar to the StringSearcher.

@dustin​ I tried it previously as well but it didn't work either. Am I missing anything ?3


dustin
Influencer
Forum|alt.badge.img+30
  • Influencer
  • August 16, 2023
katt wrote:

@dustin​ I tried it previously as well but it didn't work either. Am I missing anything ?3

There are additional inputs needed for @SubstringRegularExpression. Try this:

@SubstringRegularExpression(@Value(path_windows),.*(?<=\\),0,0,0,caseSensitive=TRUE)

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings