[PHP] Regex help appreciated

2003-08-14 Thread David Pratt
I am trying to get a regex to extract the Some and more text between the para elements below in a single pass for style attribute of heading 2 para font-size=12 font-family=Arial style=heading 2Someanchor type=bkmrk/more text-/para para font-size=12 font-family=Arial style=heading 2inline

[PHP] Arrays of strings from regex

2002-12-31 Thread David Pratt
Am working through document to collect pieces that match and then insert them into an array so they can be used to construct another file. Looking in my doc for lines like this: {\*\cs43 \additive \sbasedon10 db_edition;} {\*\cs44 \additive \sbasedon10 db_editor;} {\*\cs45 \additive \sbasedon10

[PHP] How to obtain unique XML Elements

2002-11-23 Thread David Pratt
Anyone have a simple technique for obtaining a unique list of elements from an XML file? Am looking for something that will identify the first opening tag ie thistag and the single tag anothertag/ so that I get an array of tags that I can print out. Having a bit of trouble with regex to get

[PHP] Ereg Help

2002-10-25 Thread David Pratt
Hi William, try this: ^(#[0-9]{2}-[0-9]{2,4} Item Description: [\$][0-9]{1,3}[\.][0-9]{2})$ I've just been putting a number of expressions together for validation myself. Regards, Dave Pratt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Record Sorting Using Up and Down Arrows

2002-10-06 Thread David Pratt
I'm hoping someone can help me solve this problem. I've almost got something working. Only problem is I am having some difficulty trying to come up with a case or condition for the single value (ie. devmodfile value = file 3 in example below) that it won't print any arrows up, up/down, or down.

[PHP] Record Sorting Using Up and Down Arrows

2002-10-04 Thread David Pratt
Hi there. I am trying to write a routine to allow me to sort the contents of a table by clicking on up or down arrows. The idea is that top record will have down arrow, bottom record up arrow and records inbetween both an up arrow and down arrow. Clicking the arrow causes the record to move up

[PHP] Storing script in database??

2002-08-01 Thread David Pratt
I am creating an application where it would be useful to write and store script in a field in a MySQL database and create a loop to process the array of the code contained in the field. Conceptually, I think it sounds reasonable but I am uncertain of what kind of process I could use to have the

[PHP] Example safe use of eval()

2002-08-01 Thread David Pratt
I am trying to get code that I have saved as a string in a database to evaluate as code within a larger script with a loop. There are obvious security concerns with allowing users to input code into the field if it is not preprocessed before it is evaluated. The eval function appears to be the

Re: [PHP] Example safe use of eval()

2002-08-01 Thread David Pratt
Thanks, Justin. I am really trying to figure something else out instead of eval. It is really too much of a security hole. I really appreciate the community to bounce ideas. Regards, Dave -- From: Justin French [EMAIL PROTECTED] To: David Pratt [EMAIL PROTECTED], [EMAIL PROTECTED