Note that there are some explanatory texts on larger screens.

plurals
  1. POregex help... php check entry format
    text
    copied!<p>Im using php to develop an application, but I am running into some issues with regex... </p> <p>I found a few sites that explain it, but it is for some reason over my head? can someone please help explain regex arguements?</p> <p>I uploaded a sample of what I am working on <a href="http://3rdrockmarketing.com/CLIENTsites/regex/" rel="nofollow">here</a>... </p> <p>First, click on the "+" button at top right to get to the add content view. </p> <p>Basically, I need it so when you submit from this form, php will check that the values are formatted correctly. </p> <p><strong>Domain:<em></strong> this can be .com, .co, .biz, .info, etc... User can enter the prefix, like a url, and php gets rid of it... so the ending strings in the array are just domain.com</em> </p> <pre><code>domain1.com somedomain.biz mydomain.co </code></pre> <p><strong>Redirect:<em></strong> with this one, php uses the ',' so we are left with the ip, and the domainkey as seperate strings, the ip can be 2-3 numbers per section!, so ###.##.##.###, or even ##.##.##.##, and the domain key is a varchar(not so important)</em></p> <pre><code>##.##.##.##, domainkey ###.###.###.###, domainkey </code></pre> <p><strong>Solution for redirect:</strong></p> <pre><code>(\d{1,3}\.){3}\d{1,3} </code></pre> <p><strong>/24's:<em></strong> this is similar to the redirect IP, but the end will always end in '0/24'</em></p> <pre><code>##.##.###.0/24 ##.##.###.0/24 </code></pre> <p><strong>Names:*</strong> This one should be the easiest, it can only be letters, no numbers... any length... *</p> <pre><code>randomname thisisaname </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload