Bug Tracker

Opened 8 years ago

Closed 8 years ago

#12056 closed bug (invalid)

Insert space before capital letters in jquery template using replace and regex. if $ is there it is not working

Reported by: thulasirams1986@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:

Description

the below jquery template is not working because f $1

<script id="" type="text/x-jquery-tmpl">

<table>

<tr>

{{each(i, enityCol) WorkColumnNames}}

<th class="SortList">

${String(enityCol).replace(/([A-Z])/g, ' $1')}

</th>

{{/each}}

</tr>

</table>

</script> if i replace $1 by 111 or some word it is working

<script id="" type="text/x-jquery-tmpl">

<table>

<tr>

{{each(i, enityCol) WorkColumnNames}}

<th class="SortList">

${String(enityCol).replace(/([A-Z])/g, ' 111')}

</th>

{{/each}}

</tr>

</table>

</script>

http://stackoverflow.com/questions/11428121/insert-space-before-capital-letters-in-jquery-template-using-replace-and-regex

Change History (1)

comment:1 Changed 8 years ago by dmethvin

Resolution: invalid
Status: newclosed

jquery.template is not managed on this bug tracker and is not supported by the jQuery team; you might try StackOverflow.

Note: See TracTickets for help on using tickets.