Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
I want to write a regex for matching *#xxx[.]gr in js.
My regex so far :
/^(([^<>()\[\]\\.,;:\s#"]+(\.[^<>()\[\]\\.,;:\s#"]+)*)|(".+"))#((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
I want : *#xxx.gr
If I understand your specs correctly this should suit you:
/^[^<>()\[\]\\.,;:\s#"]+#[^<>()\[\]\\.,;:\s#"]{3}\[\.\][^<>()\[\]\\.,;:\s#"]{2}$/g
Demo: https://regex101.com/r/kfjAG9/2
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
i have a file which has endpoints like this "/enpoint" or "endp/enpoint" it need to match these two patterns and grep the endpoints
thanks in advance
(endp)?\/endpoint
Here is a link to the online regex playground for the above expression.
https://regex101.com/r/I2GuF8/2
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I am trying to construct a regular expression in Javascript such that the string contains more b's than a's. Can contain other characters anywhere but b's have to be more than a's. Could anybody help?
Simplest route:
let moreAsThanBs = (str) => str.match(/a/ig).length > str.match(/b/ig).length;
console.log(moreAsThanBs("Are there more As than Bs in this sentence?"));
console.log(moreAsThanBs("Are there more As than BBBBBs in this sentence?"));
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
JsonConvert.DeserializeObject<dynamic>(strinng);
What would be the javascript code for this .NET code?
Please suggest some solution.
let object = JSON.parse(string);
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I tried this : [fl]ady?[ing] ?[rb]ug!?
I know [fl]ad[y]?(ing)? ?[br]ug!? is an answer
Can this be solved using character sets only? Must match both.
ladybug
fading rug!
I believe this should work for you
[fl]ad(y|ing)\s?[br]ug?
Check out http://www.regexpal.com/
Using character sets only? So, it doesn't matter what other letter combinations it matches as well? Mmm. Then
[fl]ad[giny]+[\sbrug!]+
would do. See: https://regex101.com/r/FJWJyM/1
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
My regex pattern for alphanumeric word is as given below :
/([A-Za-z0-9])*$/
Is "testuser" a valid input string for the above pattern?
Use character class.
So use: /^[A-Za-z0-9]+$/
And yes, testuser is a valid input for the above regex.