RegEx Match With Quotation Marks

Hello all, I am attempting to match only certain parts of a document that says the following:
aria-label="Slide. However, when I attempt to use the match activity to find this, I receive a syntax error. Does anyone know what the correct syntax would be to find this specific match? I am not sure how to include the single quotation mark inside of the regex. Thank you.

1 Like

Hi @kodm,

You can escape the Quotation mark as follows

(“spin”)

image

Warm Regards,
Ranjith Udayakumar

Hi @ranjith_udayakumar thank you for the response. Unfortunately it is still saying end of expression expected. Did I type something wrong? Thank you.

Hi
hope this would help you
"(=\WSlide)" --pass this as input value to regex expression

Cheers @kodm

Hi @kodm,

Can you share the input text, output expected, So that i can verify the Regex.

Warm Regards,
Ranjith Udayakumar

Hi @ranjith_udayakumar of course. For the ouput text I would like it to return the count of the number of times regex reads "Slide . But only the part "Slide not slider or slides. The input text is an innerhtml from a website. I attached the txt document below. Thank you! Regex.txt (39.5 KB)

Hi @Palaniyappan Thank you for your response. Unfortunately this picks up an extra two parts of the input which are marked as "Slider. Making the total count 8 instead of 6. Is there any way to filter out only the words that just say "Slide ? Thank you!

Hi @kodm,

Yeah, I got you now.

  1. Open a Text File and write the following content manually and save it as inputRegex.txt

innerhtml.(“slide”)
body
innerhtml.(“slide”)

  1. Open the input file store the data as inputRegexString
  2. Enter the pattern I gave in the Reg Ex Wizard.
  3. You will then get the count.

regexr.com/58c9i

In your screen shot you are assigning “(“Slide”)” to variable (which wont work - Invalid Syntax), This is the regex should be in the regex builder wizard.

Warm Regards,
Ranjith Udayakumar

1 Like

Thank you very much @ranjith_udayakumar. Using the regex builder wizard with your pattern worked perfectly! I greatly appreciate it.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.