Notepad ++仍然是正则表达式文本

时间:2015-09-23 09:01:08

标签: regex notepad++

我的文字如下所示。我只想保留与此表达式匹配的文本::label=\w+

SELECT
R.ResourceName AS @header :name="Carrier" :label=SelVal_Carrier :datatype=String
, C.ContainerName AS @header :name="Lot" :label=WebUI_Lot :datatype=String
, C.Qty AS @header :name="Qty" :label=SelVal_Qty :datatype=Fixed
, C.Qty2 AS @header :name="Qty2" :label=SelVal_Qty2 :datatype=Fixed

1 个答案:

答案 0 :(得分:1)

控制 + ħ

找到:$1
替换为:<html lang="en-US" ng-app="ToDo"> <style> .done{ text-decoration: line-through;color: #ccc;} </style> <body> <div ng-controller="todoController"> <form name="frm" ng-submit="addTodo()"> <input type="text" name="newtodo" ng-model="newTodo" required> <button ng-disabled="frm.$invalid">Go</button> </form> <button ng-click="clearcompleted()">Clear Completed</button> <ul> <li ng-repeat="todo in todos track by $index"> <input type="checkbox" ng-model="todo.done"/>{{$index + 1}} <span ng-class="{'done':todo.done}">{{todo.title}}</span> </li> </ul> </div> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/annyang/2.0.0/annyang.min.js"></script> <script> var app = angular.module('ToDo', []); app.controller('todoController', function($scope){ $scope.todos = JSON.parse(localStorage.getItem('todos')) || [] $scope.addTodo = function(){ $scope.todos.push({'title':$scope.newTodo, 'done':false}) $scope.newTodo = '' } $scope.clearcompleted = function(){ $scope.todos = $scope.todos.filter(function(item)){ return !item.done; } } $scope.$watch('todos', function(newValue, oldValue)){ if (newValue != oldValue){ localStorage.setItem('todos', JSON.stringify(newValue)) } }, true) }) </script> </body> </html> [1]: http://i.stack.imgur.com/TRzbZ.png