Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <head>
- <script type="text/javascript">
- function parseflame(flamestring){
- var pm = flamestring.match(/<flame\s+[^>]*>/)[0]; //get <flame ...> string
- alert("function called");
- var attributes = pm.match(/\s+([a-zA-Z0-9_]+)="[^"]*"/g); //get attributes from flame tag.
- for(var i in attributes){
- document.write(attributes[i],"<br>");
- var attributeNames=attributes[i].match(/[a-zA-Z0-9_]+/)[0];
- document.write("Attribute Name: ", attributeNames,"<br>");
- var attributeValues = /"([^"]*)"/g.exec(attributes[i]);
- document.write("Attribute Values: ", attributeValues[1], "<br>");
- document.write("<br>");
- }
- }
- </script>
- <script type="text/javascript">
- var astring='<flame name="Apophysis7x-110220-1" version="Apophysis 7x Version 15" size="481 603" center="0.287433871944588 -0.0104665524593319" scale="173.3810921581" oversample="1" filter="0.5" quality="50" background="0 0 0" brightness="4" gamma="4" gamma_threshold="0.01" estimator_radius="9" estimator_minimum="0" estimator_curve="0.4" enable_de="0" plugins="" >'
- alert(astring);
- parseflame(astring);
- </script>
- </head>
- <body>
- </body>
- ////////////////////////////////////////////////
- // RESULTS
- ////////////////////////////////////////////////
- name="Apophysis7x-110220-1"
- Attribute Name: name
- Attribute Values: Apophysis7x-110220-1
- version="Apophysis 7x Version 15"
- Attribute Name: version
- Attribute Values: Apophysis 7x Version 15
- size="481 603"
- Attribute Name: size
- Attribute Values: 481 603
- center="0.287433871944588 -0.0104665524593319"
- Attribute Name: center
- Attribute Values: 0.287433871944588 -0.0104665524593319
- scale="173.3810921581"
- Attribute Name: scale
- Attribute Values: 173.3810921581
- oversample="1"
- Attribute Name: oversample
- Attribute Values: 1
- filter="0.5"
- Attribute Name: filter
- Attribute Values: 0.5
- quality="50"
- Attribute Name: quality
- Attribute Values: 50
- background="0 0 0"
- Attribute Name: background
- Attribute Values: 0 0 0
- brightness="4"
- Attribute Name: brightness
- Attribute Values: 4
- gamma="4"
- Attribute Name: gamma
- Attribute Values: 4
- gamma_threshold="0.01"
- Attribute Name: gamma_threshold
- Attribute Values: 0.01
- estimator_radius="9"
- Attribute Name: estimator_radius
- Attribute Values: 9
- estimator_minimum="0"
- Attribute Name: estimator_minimum
- Attribute Values: 0
- estimator_curve="0.4"
- Attribute Name: estimator_curve
- Attribute Values: 0.4
- enable_de="0"
- Attribute Name: enable_de
- Attribute Values: 0
- plugins=""
- Attribute Name: plugins
- Attribute Values:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement