Jump to content
Old threads will finally start getting archived ×

SupraCharger

Members
  • Posts

    15
  • Joined

  • Last visited

Everything posted by SupraCharger

  1. What about MySQL "MEMORY storage Engine" ? Would that be like a "Free Store" in C++ Terms? Would that be a better option? I'm a bit timid on Memcached. A.
  2. I was wondering about Efficiency. Say the user writes a script ( maybe a Function to make it easier on the User ). But the Client does Not need all of that script running over and over again to each client. So is there a Function that maybe writes a more basic script for the client, from the more complex script that does not need to run every time the page is loaded on the web?Thanx for your help, Andrew
  3. Thank you that fixed the issue, Andrew
  4. Hi, I'm trying to pull out parts of a html page and I've tried this for hours an I can't seem to get it to work. // I'm pulling this info from get_file_contents () $contfile = ' <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <!-- PHP: Header End --> <!-- PHP: Footer Start --> </body> </html> '; $pattern = '/^(.*)(<!\-\- PHP: Header End \-\->)(.*)$/'; $replacement = "$1$2"; $header = preg_replace ($pattern, $replacement, $contfile); // I want it to output $header = ' <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <!-- PHP: Header End --> '; I've tried to use other functions (preg_grep () , preg_match () ) and I can't get those to work. If you could please show me the syntax to how to properly accomplish this task It would be greatly appreciated. Thanx for your help, Andrew
  5. This Should be the last bug. $pattern = '/^"?(C:\\\\)([[:alnum:]_*\-*\040*]+\\\\)*[[:alnum:]_*\-*\040*]+(\.)[[:alpha:]]{2,4}"?$/'; A.
  6. This one will fix that. $pattern = '/^.?(C:\\\\)([[:alnum:]_*-*\040*]+\\\\)*[[:alnum:]_*-*\040*]+(\.)[[:alpha:]]{2,4}.?$/'; A.
  7. nope this ones better $pattern = '/.?(C:\\\\)([[:alnum:]_*-*\040*]+\\\\)*[[:alnum:]_*-*\040*]+(\.)[[:alpha:]]{2,4}.?$/'; A.
  8. (This one is Safer) I think this pattern that I wrote would work very well for Files the have double quotation marks around them. Ex: "C:\Users\Owner\Desktop\old_databases.docx" $pattern = '/.{0,1}(C:\\\\)([[:alnum:]_*-*\040*]+\\\\)*[[:alnum:]_*-*\040*]+(\.)[[:alpha:]]{2,4}.{0,1}$/'; Andrew P.S. While you guys did an amazing job explaining the concept, I think this post answers my first question the best.
  9. I think this pattern that I wrote would work very well for Files the have double quotation marks around them. Ex: "C:\Users\Owner\Desktop\old_databases.docx" $pattern = '/.*(C:\\\\)([[:alnum:]_*-*\040*]+\\\\)*[[:alnum:]_*-*\040*]+(\.)[[:alpha:]]{2,4}.*$/'; Andrew P.S. While you guys did an amazing job explaining the concept, I think this post answers my first question the best.
  10. Thanx all for clearing that up for me, the mash of Chars in regular expressions gives me tunnel vision. But I forgot the regex engine stips the escape char '\' out. salathe, Is it because you don't want a didget extension ex: ( .213 ). Wait I forgot about the " $ ", I have no idea? Thanx, A.
  11. Sry for that requinix, So to get a literal backslash in parentheses" () " you do this: \\\\. what about when you want a literal backslash not in parentheses do you still do this: \\\\ Thanx, A.
  12. Thank you Christian F. you really know your stuff, I still can't seem to get this pattern right from the top of the thread. requinix, The pattern did not work. There where no errors but it didn't validate correctly. I Think '\\\\' in '(C:\\\\)' is for double quotes. $pattern = '/^(C:\\)[[:print:]]$/'; For Validating: C:\Users\Owner\Desktop\old_databases.docx Thanx, A.
  13. Thank you salathe, I wanted this for html. So I can say something like this From: (<form> tag) (don't worry about the chars in here) End: (</form>) So [[:print:]] is the best option? Thanx, Andrew
  14. Thank you for that fix requinix. Do you or does anyone know of a class or Syntax on: how to have any alpha numeric characters & all the symbols on the keyboard ? Is it [[:ascii:]] ? I found info on this: http://www.asciitable.com/ Thanx for your time, Andrew
  15. Hi all, I'm trying to get this regular expression to work, but I keep getting a error: Warning: preg_match(): Unknown modifier ']' $pattern = '/^(C:\\)[A-Za-z0-9\040\.\-\\\/]$/'; $pattern = '/^(C:\\)[[:alnum:]\040\.\-\\\/]$/'; // Also tried this pattern if (preg_match ( $pattern, trim ($_POST['contfile']) )) Thanx for your help, Andrew
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.