Dot Matches Newline not working on regex
Posted: Mon Aug 26, 2024 1:32 pm
I'm trying to find and a replace matches for the following regex pattern using the "Dot Matches Newline" flag but am getting the error message...
Error in Find: Specified argument was out of the range of valid values. My understanding is that Text Crawler uses .NET regex engine so the "Dot Matches Newline" checkbox that I have checked should work for "Single line" as shown in Regex01
The regex pattern is proven to work in reg101 - https://regex101.com/r/9Y2Gfy/1
test string:
Error in Find: Specified argument was out of the range of valid values. My understanding is that Text Crawler uses .NET regex engine so the "Dot Matches Newline" checkbox that I have checked should work for "Single line" as shown in Regex01
The regex pattern is proven to work in reg101 - https://regex101.com/r/9Y2Gfy/1
Code: Select all
regex: ^(.*?(?:@heroImageURL\s*=\s*""[^""]+"".*?){1}@heroImageURL\s*=\s"")[^""]+(?="")
Code: Select all
IF @brandName == "A" THEN
set @heroImageURL = "http://www.image.com/a9230239u230.jpg"
set @productImageURL = "http://www.image.com/A29200923.jpg"
ELSEIF @brandName == "B" THEN
set @heroImageURL = "http://www.image.com/b2389823u238.jpg"
set @productImageURL = "http://www.image.com/B22392029.jpg"
ELSEIF @brandName == "C" THEN
set @heroImageURL = "http://www.image.com/c23892389289.jpg"
set @productImageURL = "http://www.image.com/C49309934.jpg"
ELSEIF @brandName == "D" THEN
set @heroImageURL = "http://www.image.com/d23423892833.jpg"
set @productImageURL = "http://www.image.com/D09349409.jpg"
ELSEIF @brandName == "E" THEN
set @heroImageURL = "http://www.image.com/e22823889899.jpg"
set @productImageURL = "http://www.image.com/E22092309.jpg"
ELSE
set @heroImageURL = "http://www.image.com/e22823889899.jpg"
set @productImageURL = "http://www.image.com/E22092309.jpg"
ENDIF
Code: Select all
Substitution: $1http://www.google.com/1.jpg