Skip to main content

Bug Tracker

Side navigation

#12056 closed bug (invalid)

Opened July 11, 2012 08:25AM UTC

Closed July 11, 2012 01:18PM UTC

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

Reported by: thulasirams1986@gmail.com 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

Attachments (0)
Change History (1)

Changed July 11, 2012 01:18PM UTC by dmethvin comment:1

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.