Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

152
Views
Regex para que coincida con el enlace s3

Tengo un objeto s3 en el siguiente formato.

 https://s3-{region}.amazonaws.com/{bucket}/{environment}/{keyname}

Necesito una expresión regular que pueda obtener las variables individuales de un enlace s3. Actualmente tengo la siguiente expresión regular.

 r"https\:\/\/s3\-(\w+)\.amazonaws\.com\/(\w+)\/(\w+)\/(\w+)$"

Pero devuelve Ninguno.

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Podrías ir por:

 https?://s3- (?P<region>[^.]+).amazonaws.com/ (?P<bucket>[^/]+)/ (?P<environment>[^/]+)/ (?P<keyname>.*)

Vea una demostración en regex101.com .


En Python esto sería:

 import re rx = re.compile(r''' https?://s3- (?P<region>[^.]+).amazonaws.com/ (?P<bucket>[^/]+)/ (?P<environment>[^/]+)/ (?P<keyname>.*)''', re.VERBOSE) links = rx.findall(your_string_here)
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!