hello members, I am a new regex student and it is very challenging to me I have a very important question to ask about regex.
I am actively looking for an answer about this please help me
Thanks
Please verify that the following regex will correctly test that the input data is a well-formed HTTP request.
"(?i)\\A(\\x20|\\t)*(([A-Z]|[A-Z]-?|[A-Z]_?){2,19}[A-Z])(\\x20|\\t)++.+(\\x20|\\t)++HTTP\\x2F1\\x2E(0|1)(\\x20|\\t)*"
What are its limitations?
Alain
HTTP regex
Moderator: General Moderators
Re: HTTP regex
Protip: use single quotes for regex strings so you don't have to escape all those backslashes.
"Correctly" according to what? It doesn't follow the RFC, if that's what you're asking. 2616 if you want to check it out - start at section 5.1.
"Correctly" according to what? It doesn't follow the RFC, if that's what you're asking. 2616 if you want to check it out - start at section 5.1.
Re: HTTP regex
Hello requinix,
Thanks for your reply, i read about rfc2616 section 5.1. but not understood it
I need to:
verify that the following regex will correctly test that the input data is a well-formed HTTP request.
"(?i)\\A(\\x20|\\t)*(([A-Z]|[A-Z]-?|[A-Z]_?){2,19}[A-Z])(\\x20|\\t)++.+(\\x20|\\t)++HTTP\\x2F1\\x2E(0|1)(\\x20|\\t)*"
and what are the limitations
Thanks for your reply, i read about rfc2616 section 5.1. but not understood it
I need to:
verify that the following regex will correctly test that the input data is a well-formed HTTP request.
"(?i)\\A(\\x20|\\t)*(([A-Z]|[A-Z]-?|[A-Z]_?){2,19}[A-Z])(\\x20|\\t)++.+(\\x20|\\t)++HTTP\\x2F1\\x2E(0|1)(\\x20|\\t)*"
and what are the limitations
Re: HTTP regex
Then let me quote myself:
Maybe you're looking for an explanation of how the regex works?
As far as I'm concerned, no it does not do it correctly, and its limitations are all to do with the fact that it is incorrect.requinix wrote:"Correctly" according to what? It doesn't follow the RFC, if that's what you're asking.
Maybe you're looking for an explanation of how the regex works?