Search for Drive Files with regex

107 views
Skip to first unread message

Benjamin Barshaw

unread,
Jan 6, 2025, 2:46:35 PMJan 6
to GAM for Google Workspace
Is there a way to search Google Drive files based on pattern matching instead of keywords?  For example, we are trying to find out for Data Loss Prevention if Social Security Numbers exist within our Google Workspace.  Rather than do:

gam all users print filelist query "fullText contains 'SSN'" todrive

I would like to match on a regex pattern like this:

^(?!0{3})(?!6{3})[0-8]\d{2}-(?!0{2})\d{2}-(?!0{4})\d{4}$

I can't seem to find documentation on a regex operator for the filelist query though.

Thanks!




Ross Scroggs

unread,
Jan 6, 2025, 2:50:35 PMJan 6
to google-ap...@googlegroups.com
The Drive API query (https://developers.google.com/drive/api/guides/ref-search-terms) has no regex capabilities.

Ross
----
Ross Scroggs



--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-apps-manager/742fd43f-5b6c-43ff-a719-29b5f332afe0n%40googlegroups.com.

Benjamin Barshaw

unread,
Jan 6, 2025, 3:03:23 PMJan 6
to GAM for Google Workspace
That's what I was afraid of -- thanks Ross!
Reply all
Reply to author
Forward
0 new messages