


That dollar sign at the end I am assuming you mean end of string? If so, you don't escape that either.so your pattern could be: You have the pattern /+\$/iĪs I noted earlier within the thread, if you want to detect a dash within your character class, you need to either put is as the very first (or last character) or escape it. In case "letters_onl圓": you have the pattern // You can a) add an 'i' modifier after the closing delimiter to check for upper and lowercase, and b) you don't need to escape the dot, because it is inside a character class, the dot is treated as a literal.

In case "letters_only2": you done escape the \s in the pattern /^+/i nor do you need to list A-Z as you already have the i modifier listed after the closing delimiter which checks for both upper and lower case characters. If your intention is to say, from the start of the string, look for either a 1,2 or 3, your pattern could be: /^/. If you just want to say, anything that is not a 1,2 or 3 you can use something like, as this is a character class, and character classes look for a single character and compares if that character in the string matches (or doesn't match) any character listed within it. What this is saying is anything that is not a 1, or a pipe, or a 2, or a pipe, or a 3. Just looking through your validate_form.php, I can see things within regex like in your case:donations you have the pattern: // in the event you don't need to split something using regex, explode is often the faster choice).

If members are willing, all the more power to you.īut from a quick glance, I can see so much preg and split statements going on, something tells me your code structure needs to be considerably simplified (a note on split, as it states in the manual, often, preg_split is faster. Please understand that while these forums are there to help people out, I don't think the spirit of these forums include a place to dump large amounts of code with the expectations of someone to take considerable amounts of their time to problem solve them (not trying to sound difficult or rude here). I don't have time to sift through large chunks of code.
