Make a function that produces a regex based on keywords.

Befejezett Kiadva: 3 évvel ezelőtt Kiszállításkor fizetve
Befejezett Kiszállításkor fizetve

We want to be able to dynamically build a RegExp that identifies urls. We will give in input a pattern containing keywords and jollies and a string containing many urls.

Build a function 'matchPattern(pattern, str)' that, given a primitive pattern and a string containing urls in input, constructs a regex as:

- Everything should be enclosed by quotes (either "" or '')

- pattern may contain {number} or {string} variables. Replace them with zero to unlimited 1-9 and A-z

Finally the function should return matched pattern(s) based on str parameter.

Examples

matchPattern("/job/{string}/{string}","\"[login to view URL]\"")

returns -> [login to view URL]"

matchPattern("/job/{number}/{string}","'[login to view URL]'")

returns -> False

matchPattern("/job/{string}","[login to view URL]")

returns -> False # No enclosing quotes

matchPattern("/{string}/{string}","'[login to view URL]'")

returns -> [login to view URL]

matchPattern("/{string}/{string}","[login to view URL]")

returns -> False # No enclosing quotes

matchPattern("/{string}/{string}","['/str/str','/abc/efg']")

returns -> Array(['/str/str','/abc/efg'])

matchPattern("/{string}?a","<a href='[login to view URL]' />")

returns -> [login to view URL]

Python Reguláris kifejezések

Projektazonosító: #28979572

A projektről

6 ajánlat Távolról teljesíthető projekt Utoljára aktív: 3 évvel ezelőtt

Odaítélve:

abytesh

Hi, I just read the description and rules. I can write the expression right away. Ping me on chat. Thanks.

$30 USD 1 napon belül
(10 értékelés)
4.1

6 szabadúszó tett átlagosan 52$ összegű árajánlatot erre a munkára

VeteranLK

Hi, inputs (string or array of strings), output -> string, None, or array of strings I have clearly identified the function. so "string","number" are the only data types? I can deliver in few hours, targeting python Továbbiak

$90 USD 1 napon belül
(12 vélemény)
4.3
DestinyGuider

i am ready to start now Have read your description on project very carefully. I'm a professional developer with 1+ year experience as you can see my profile. Have completed many similar projects perfectly till now and Továbbiak

$99 USD 2 napon belül
(2 vélemény)
2.2
Manpreetsweden

✔️✔️✔️High ✔️python Hello. how are you doing today? I am interested in your project and understood you are looking for a ✨Python Developer✨ to make a function that produces a regex based on keywords. I'm a full stack Továbbiak

$30 USD 2 napon belül
(1 Visszajelzés)
0.5
fakhruddinb

Hello, I read your project description and I am happy to introduce myself to you. I am a professional software engineer with more than 7 years of experience in building software/Website using .NET technologies and too Továbbiak

$50 USD 2 napon belül
(0 vélemény)
0.0
devMahdi

hi, I am an experienced python developer. It is a very easy task for me. I have read your project's description. I can do it however you want it to be, no problem. So please feel free to response me, good luck.

$10 USD 1 napon belül
(0 vélemény)
0.0