User:Xenwolf/SandBox: Difference between revisions

Xenwolf (talk | contribs)
Xenwolf (talk | contribs)
Testing factor notation: added input and legend
Line 126: Line 126:
== Testing factor notation ==
== Testing factor notation ==


<code><nowiki>{{#replace:{{#regex: 2^-4 * 3^4 * 5^-1|/(\d+)\s*\^\s*(-?\d+)(\s*\*\s*)?/|\1<sup>\2</sup> \3&amp;nbsp;}}|*|⋅}}</nowiki></code>
Input: <code>2^-4 * 3^4 * 5^-1</code>


{{#replace:{{#regex: 2^-4 * 3^4 * 5^-1|/(\d+)\s*\^\s*(-?\d+)(\s*\*\s*)?/|\1<sup>\2</sup> \3&nbsp;}}|*|⋅}}
Code: <code><nowiki>{{#replace:{{#regex: 2^-4 * 3^4 * 5^-1|/(\d+)\s*\^\s*(-?\d+)(\s*\*\s*)?/|\1<sup>\2</sup> \3&amp;nbsp;}}|*|⋅}}</nowiki></code>
 
Output: {{#replace:{{#regex: 2^-4 * 3^4 * 5^-1|/(\d+)\s*\^\s*(-?\d+)(\s*\*\s*)?/|\1<sup>\2</sup> \3&nbsp;}}|*|⋅}}