Using Regex within sourceExtract to save specific number in csv

Good evening dear community,

while exploring the sourceExtract command, I found out that using the * just reads the whole following left content from the html-code.

The pattern of the data I want to extract from html-code is the following one:

( 1 - 1 von 2)

Is there any solution to save just the value 1 in combination with csvSave?

My approach should be extendable. The number in bolt letters is in every case unknown. (Bigger numbers are possible).

My first attempt:

sourceExtract | *von | !csvLine
csvSave| testfile.csv

just saves more than I need.

Is there a regex solution possible? I donĀ“t really understand how this syntax works.

Thank you in advance for your assistance!

Best regards

Fabian

You can do regex:

sourceSearch | regex=/yourtext/i

https://ui.vision/rpa/docs/selenium-ide/sourceextract-sourcesearch

Thank you for your first attempt to help!

I gave this regex formulation a try:

image

As I said before, I need to have a regex combined with sourceExtract-command.

I tried it with this attempt, to save the number in the middle.

sourceExtract | von* \d | !csvLine

I assume there is a better solution to this problem?

Is there a combination of xpath and regex possible?

Why do you need a better solution? What is wrong with the regex version?