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!

View solution in original post

Thanks its solved.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,000)