web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to understand rege...
Power Apps
Unanswered

How to understand regex pattern in Power App?

(0) ShareShare
ReportReport
Posted on by

I have a json below:

 

 

 

 

{
	"statusCode": 200,
	"headers": {
		"Transfer-Encoding": "chunked",
		"Vary": "Origin,Accept-Encoding",
		"X-SharePointHealthScore": "1",
		"X-SP-SERVERSTATE": "ReadOnly=0",
		"DATASERVICEVERSION": "3.0",
		"SPClientServiceRequestDuration": "63",
		"SPRequestGuid": "d31336a0-9010-1000-0a20-dcb653f71e16",
		"request-id": "d31336a0-9010-1000-0a20-dcb653f71e16",
		"MS-CV": "oDYT0xCQABAKINy2U/ceFg.0",
		"Strict-Transport-Security": "max-age=31536000,max-age=31536000; includeSubDomains",
		"X-FRAME-OPTIONS": "SAMEORIGIN,DENY",
		"Content-Security-Policy": "frame-ancestors 'self' teams.microsoft.com *.teams.microsoft.com *.skype.com *.teams.microsoft.us local.teams.office.com *.powerapps.com *.yammer.com *.officeapps.live.com *.office.com *.stream.azure-test.net *.microsoftstream.com *.dynamics.com *.microsoft.com;",
		"MicrosoftSharePointTeamServices": "16.0.0.22330",
		"X-Content-Type-Options": "nosniff,nosniff",
		"X-MS-InvokeApp": "1; RequireReadOnly",
		"x-ms-request-id": "d31336a0-9010-1000-0a20-dcb653f71e16",
		"Cache-Control": "no-store, max-age=0, private",
		"P3P": "CP=\"ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI\"",
		"Set-Cookie": "ARRAffinity=b4a5d5fe349f4c875ad3d8ac25e07615025468d24d2831b4f4987af0338dc44a;Path=/;HttpOnly;Secure;Domain=sharepointonline-wus.azconn-wus.p.azurewebsites.net,ARRAffinitySameSite=b4a5d5fe349f4c875ad3d8ac25e07615025468d24d2831b4f4987af0338dc44a;Path=/;HttpOnly;SameSite=None;Secure;Domain=sharepointonline-wus.azconn-wus.p.azurewebsites.net",
		"X-AspNet-Version": "4.0.30319",
		"X-Powered-By": "ASP.NET",
		"Timing-Allow-Origin": "*",
		"x-ms-apihub-cached-response": "false",
		"x-ms-apihub-obo": "true",
		"Date": "Fri, 22 Apr 2022 02:18:32 GMT",
		"Content-Type": "application/json; odata=verbose; charset=utf-8",
		"Expires": "Thu, 07 Apr 2022 02:18:33 GMT",
		"Last-Modified": "Fri, 22 Apr 2022 02:18:33 GMT",
		"Content-Length": "220103"
	},
	"body": {
		"d": {
			"results": [
				{
					"__metadata": {
						"id": "https://edwarddev365.sharepoint.com/sites/meekou/_api/Web/Lists(guid'6eab758a-a821-4a06-b27d-09dc81dd33bf')/Fields(guid'd307dff3-340f-44a2-9f4b-fbfe1ba07459')",
						"uri": "https://edwarddev365.sharepoint.com/sites/meekou/_api/Web/Lists(guid'6eab758a-a821-4a06-b27d-09dc81dd33bf')/Fields(guid'd307dff3-340f-44a2-9f4b-fbfe1ba07459')",
						"type": "SP.FieldLookup"
					},
					"DescriptionResource": {
						"__deferred": {
							"uri": "https://edwarddev365.sharepoint.com/sites/meekou/_api/Web/Lists(guid'6eab758a-a821-4a06-b27d-09dc81dd33bf')/Fields(guid'd307dff3-340f-44a2-9f4b-fbfe1ba07459')/DescriptionResource"
						}
					},
					"TitleResource": {
						"__deferred": {
							"uri": "https://edwarddev365.sharepoint.com/sites/meekou/_api/Web/Lists(guid'6eab758a-a821-4a06-b27d-09dc81dd33bf')/Fields(guid'd307dff3-340f-44a2-9f4b-fbfe1ba07459')/TitleResource"
						}
					},
					"AutoIndexed": false,
					"CanBeDeleted": false,
					"ClientSideComponentId": "00000000-0000-0000-0000-000000000000",
					"ClientSideComponentProperties": null,
					"ClientValidationFormula": null,
					"ClientValidationMessage": null,
					"CustomFormatter": null,
					"DefaultFormula": null,
					"DefaultValue": null,
					"Description": "",
					"Direction": "none",
					"EnforceUniqueValues": false,
					"EntityPropertyName": "OData__CommentCount",
					"Filterable": true,
					"FromBaseType": false,
					"Group": "自定义栏",
					"Hidden": true,
					"Id": "d307dff3-340f-44a2-9f4b-fbfe1ba07459",
					"Indexed": false,
					"IndexStatus": 0,
					"InternalName": "_CommentCount",
					"IsModern": false,
					"JSLink": "clienttemplates.js",
					"PinnedToFiltersPane": false,
					"ReadOnlyField": true,
					"Required": false,
					"SchemaXml": "<Field ID=\"{d307dff3-340f-44a2-9f4b-fbfe1ba07459}\" Name=\"_CommentCount\" Sealed=\"TRUE\" DisplaceOnUpgrade=\"TRUE\" Hidden=\"TRUE\" ReadOnly=\"TRUE\" ShowInFileDlg=\"FALSE\" Type=\"Lookup\" DisplayName=\"评论计数\" List=\"Docs\" FieldRef=\"ID\" ShowField=\"CommentCount\" JoinColName=\"DoclibRowId\" JoinRowOrdinal=\"0\" JoinType=\"INNER\" SchemaVersion=\"16.0.139.0\" RecreateIfMissing=\"TRUE\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"_CommentCount\" />",
					"Scope": "/sites/meekou/Lists/List1",
					"Sealed": true,
					"ShowInFiltersPane": 0,
					"Sortable": true,
					"StaticName": "_CommentCount",
					"Title": "评论计数",
					"FieldTypeKind": 7,
					"TypeAsString": "Lookup",
					"TypeDisplayName": "查阅项",
					"TypeShortDescription": "查阅项(此网站已有的信息)",
					"ValidationFormula": null,
					"ValidationMessage": null,
					"AllowMultipleValues": false,
					"DependentLookupInternalNames": {
						"__metadata": {
							"type": "Collection(Edm.String)"
						},
						"results": []
					},
					"IsDependentLookup": false,
					"IsRelationship": false,
					"LookupField": "CommentCount",
					"LookupList": "",
					"LookupWebId": "3462638e-632f-4a57-a669-f0b6ce1bcbf2",
					"PrimaryFieldId": "ID",
					"RelationshipDeleteBehavior": 0,
					"UnlimitedLengthInDocumentLibrary": false
				}
			]
		}
	}
}

 

 

I want to get value for `Title`  and `StaticName`, but I fail to make it work with `MATCHALL`

Categories:
I have the same question (0)
  • EdViegas Profile Picture
    436 on at

    I've created a TextInput (named TextInput1) control and put your code in Default property.

     

    Then, I've created a Label and put this code in Text property

     

    First(
     First(
     MatchAll(
     TextInput1.Text,
     "Title\"": \""(.*)\"""
     )
     ).SubMatches
    ).Value

     The result is:

    评论计数
  • Meekou Profile Picture
    on at

    Thanks.

    What is the pattern for getting "Title" and "StaticName"?

    Your code only return "Title".

  • EdViegas Profile Picture
    436 on at

     

    First(
     First(
     MatchAll(
     TextInput1.Text,
     "StaticName\"": \""(.*)\"""
     )
     ).SubMatches
    ).Value

     

    If you want to make all together is another price 🤣

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 320 Most Valuable Professional

#2
11manish Profile Picture

11manish 210

#3
Valantis Profile Picture

Valantis 167

Last 30 days Overall leaderboard