![](/img/trans.png)
[英]Xamarin C# - How can I connect blob storage account name and key to a preference?
[英]How to extract storage account name and blob name from storage uri
我有以下网址为azure https://restoreprojectdb.blob.core.windows.net/bacpacfiles/TestDB.bacpac
我想使用正则表达式从URL中提取“restoreprojectdb”和“bacpacfiles”。
什么是最好的正则表达式?
不确定它是否是最好的正则表达式,但如果格式总是或多或少相同我只会做https:\\/\\/(.*)?.blob.core.windows.net\\/(.*)?\\/
https://(?<account>[a-z0-9]{3,24}).blob.core.windows.net/(?<container>[a-z0-9\-]{3,63})/
思考命名规则: https : //blogs.msdn.microsoft.com/jmstall/2014/06/12/azure-storage-naming-rules/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.