cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
andlias
New Member

Extract data from webparts

Hi, i am stuck in extract data from webparts ive already try to use regex but without sucess.

 

The regex works fine for pattern a part of text that contains "consta" e a part that contains an alphanumeric code.

 

/([a-z]*)\s(?:consta)/gi

Example: consta, não consta

 

[!0-9A-Z\n]{16}/g

Example: Código de controle da certidão: NPFP260821142107

 

Already tested the regex at regex101: build, test, and debug regex and works fine.

 

My problem is putting the regex on the field regex of the function extract data form webparts the result is empty, without the regex the text is too long, im doing the regex to extrat just what i wanted, the status consta, não consta and alphanumeric code.

1 ACCEPTED SOLUTION

Accepted Solutions
John_Mavridis
Microsoft
Microsoft

Hello,

the g modifier is not recognized in PAD, as multiple occurrences can be identified in another way.

 

In your example, use the 'Extract data from web page' action leaving the Regex field empty, then use the 'Parse text' action onto the previously produced variable.

 

For the first case, you can use this regular expression:

([a-z,ã]*)\s(?:consta)

but you need to disable the toggle button "First occurrence only"

- note that ã is not part of the alphabet, so it needs to be added independently -

 

For the second case, you can use:

[!0-9A-Z\n]{16}

 

Hope this works for you!

View solution in original post

2 REPLIES 2
John_Mavridis
Microsoft
Microsoft

Hello,

the g modifier is not recognized in PAD, as multiple occurrences can be identified in another way.

 

In your example, use the 'Extract data from web page' action leaving the Regex field empty, then use the 'Parse text' action onto the previously produced variable.

 

For the first case, you can use this regular expression:

([a-z,ã]*)\s(?:consta)

but you need to disable the toggle button "First occurrence only"

- note that ã is not part of the alphabet, so it needs to be added independently -

 

For the second case, you can use:

[!0-9A-Z\n]{16}

 

Hope this works for you!

Thanks its solved.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Top Kudoed Authors
Users online (1,942)