Php preg_match regex - match chars from a to z and should contain @ char?

You can use a look-ahead assertion to assert that: (?=^@*@)a-zA-Z@{3,30}$/is Here the look-ahead assertion (?=^@*@) ensures that there is at least one.

You can use a look-ahead assertion to assert that: /^(?=^@*@)a-zA-Z@{3,30}$/is Here the look-ahead assertion (?=^@*@) ensures that there is at least one @.

Thank you very much Gumbo, you are great .. – al-dr Aug 27 at 10:08.

It's very simple - just use strpos() to find @ character in string. For example if(strpos('@','thestring')! ==FALSE) { /* it contains @ */ } else { /* it doesn't */ }.

Try this: %^a-z{2,29}@a-z@{2,29}$%is Several Issues I also fixed: You don't need to use a-zA-Z if you specified the I controller for case insensitivity. You can change the delimiters to whatever (almost) character you'd like, if you know a character will be in the regex pattern, don't use it as delmiter.

The problem is that aa@aa doesn't fit this regexp. – GlitchMr Aug 27 at 9:42 You are right. Corrected.

– Truth Aug 27 at 9:45 hi Rikudo Sennin, your note is very important to me . Thank you .. * your regex return false . – al-dr Aug 27 at 9:50 Now this regexp is too liberal.It can be above 30 characters and still pass.

Sadly, unsolvable without making insane long regexp or another piece of code, like my strpos(). – GlitchMr Aug 27 at 9:51 Unless the OP will state exactly what the terms of a valid string is, I don't see this question getting anywhere. – Truth Aug 27 at 10:01.

A-z@+$~i If you need only 1 @ char between a-z blocks you may use ~^a-z+@a-z+$~i if you want to check full length of string you may use strlen, if you want do it for every part separately just replace + by {mincnt,maxcnt}.

– al-dr Aug 27 at 9:59 @al-dr please edit your question to include valid and invalid input examples. We won't guess what you need. – Truth Aug 27 at 10:00.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions