Bug Tracker

Modify

Ticket #12056 (closed bug: invalid)

Opened 10 months ago

Last modified 10 months ago

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:
Blocking: Blocked by:

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

comment:1 Changed 10 months ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

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

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.