Jump to content

GoneNowBye

Members
  • Posts

    119
  • Joined

  • Last visited

Everything posted by GoneNowBye

  1. Hi there, I honestly thought this forum died. In light of the recent breach I'd like my account deleted or renamed please. Didn't read the TOS at the time (and was a minor) but I do have rights. Thanks
  2. Mtchl loving the maths, but belive me from experance, this is not computationally feasable, in terms of time, you're also better off not caching the permutations, GL though
  3. This is sad, but i really want intelligent company, athough my spelling is offically the level of a 14 year old (Dyslexia, a real killer) i do love to just woffle about concepts and thoughts. so really i'm just looking for IM contacts to "talk codes" with, project concepts share code, test stuff, so forth... please do PM me, i'd love it if you had skype, Thanks? sorry about the depressing nature of this, but i really long for as i said, intelligent company.
  4. DELETE FROM Table Name WHERE id=my_picture_id syntax error, thats all
  5. check your PM i think you want PREG_REPLACE check your pm and i'll probably be able to help
  6. sorry that was a proof reading fail. and a "too many thoughts" fail maybe i should POST a much more robust library (When compaired to the out-of-the box session functions) that can actually be used as a system for on the fly authentication (when the user returns) as oppossed to; "they have the session must be them" hmm excuse the spellings <--dyslexic, but still more intelligent then you
  7. in the code of those that have never tried / lack the inteligence to do it themselves. ^.^ maybe i should realise a much more robust library that can actually be used for on the fly authentication (when the user returns) rather then, "they have the session must be them" hmm
  8. dont use sessions, a cookie is a high enough level interface. but if you want to store variables in the cookie, i recomend, storing the variables server side, and the cookie can be a hash, or an id, to a row in a table, and read them off there.... this also allows data to be ip checked - stop cookie theives, 'cept for the ones in the same house.
  9. [] means a class, or posible options [abc] means a or b or c so....your telling regex to match not match alot of stuff.... anyway what you want is: (href="(.*?)") that should work fine (as your entire expression, you dont need / / at the start and the end) the data between quotes will be at result_array[1] btw and the * is greedy, it matches any character AS MUCH AS IT CAN you want lazy to match it as little as posible (up until the next quote) otherwise it would match for example href="stuff" more "stuff" "doo" "foo" "bar" greedy regex matches: stuff" more "stuff" "doo" "foo" "bar Lazy matches: stuff the *? makes it 0 or more matches - but as little as posible.
  10. permutations are similar to changing number base. permutation number = 5 n (options) = a and b keep removing from left to right, the highest value of n you can, times it by position from right * n each row. think of it like change, if we have a 1p 2p 5p 10p 20p 50p coins and i want 57 pence, you keep removing the biggest coin you can, 50, (leaving 7) 5, leaving 2, and 2 leaving 0 so 50 + 5 + 2 pence coins. i'm in a rush, sorry.
  11. Quite often you need to consider what is a litteral backslash for example preg_whatever("/\n/") puts a new line character in there preg_whatever("/\\n/") puts a backslash and an n in and is thus a new line character to the REGEX Engine
  12. they're all wrong .*? means least number of characters .* means most number of characters the ? operator makes Regex be lazy. make the smallest match it can ? by itself (not after a + or * or {}) means optional, may be there
  13. i just found a thread that details on how one cant parse html with regex, i regret my example now, none the less, can one match the first occourance with the first occourance, and second with second, or does the overlap never not occour?
  14. okay i'm gonna simplfy it here, hence lack of codes, i've made some sort of markup language, rather then try and explain it, i'll just use html. lets say i'm trying to parse html and i have <div id="this"> </div> <div id="that"> </div> and you tell regex to match (?:<div )([A-Za-z0-9= "_]*)>([\\[\\]=" ->a-zA-Z_]*)(?:</div>) its fine but it matches </div> <div id="that"> not each div tag seperatly, how may i specify to REGEX dont match the end one match the ones between
  15. preg_match_all("/(?:[^\\]|^)(?:\[link:([a-zA-Z0-9=,]*)\])/",stripslashes($_GET['d']),$matches); is my line Warning: preg_match_all() [function.preg-match-all]: Compilation failed: unmatched parentheses at offset 41 in what is going on! i dont get it, please help dont comment on the security of $_GET d this is a local test page, Havok I dont get the error 'tis all
  16. /(?:[^\\]|^)\[[a-z]*\]/ works!!! but it returns a multidmensional array, i want the [1] one...can i get rid of the first (memory is a concern serously) Array ( [0] => Array ( [0] => [hello] [1] => [test] ) [1] => Array ( [0] => [hello] [1] => [test] ) ) the first one has a trailing space
  17. i've now got /([^\\])\[[a-z]*\]/ which works, but its returning a multidimension array, i just want the overall matches any thoughts please?
  18. i'm at school now on my phone btw, so if its obvouse its because my mind is focused on the pending stats exam heres the problem i need a REGEX expression which matches "[this] but not \[this]" my expression : /[^\\]\[[(a-z)]*\]/ its fine, but it wont match correctly if a valid tag ([tag]) is at the start of the string "[hello] \[world]" no matches " [hello] \[world]" matches [hello] please help
  19. probably not, most browsers only show the relivant cookies anway (your site can only see the ones its registered for example)
  20. paypal also have a great fake-API its like the API but has no actual currencies involved, reallly helps, last thing you want is a bug with money systems
×
×
  • 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.