RegExp not working

Bug #164734 reported by Charles Goodwin
2
Affects Status Importance Assigned to Milestone
Vexi
Confirmed
Medium
Unassigned

Bug Description

<vexi xmlns:ui="vexi://ui">

    static.trim = function(str) { return str.replace(vexi.regexp("/^\s+|\s+$/",'g'),""); }
    static.trimleft = function(str) { return str.replace(vexi.regexp("/^\s+/",'g'),""); }
    static.trimright = function(str) { return str.replace(vexi.regexp("/\s+$/",'g'),""); }

    <ui:box>
        var test = " test ";
        var show = function(f) { vexi.log.info("'"+static[f](test)+"'"); }
        show("trim");
        show("trimleft");
        show("trimright");
    </ui:box>
</vexi>

Output:
                16: ' test '
                16: ' test '
                16: ' test '

Expected:
                16: 'test'
                16: 'test '
                16: ' test'

Changed in vexi:
importance: Undecided → Medium
milestone: none → 3.0-future
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.