Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
(select top [0-9]+ percent|select top [0-9]+|select )
/
ig

Description

Some times we need replace de first select in a query to another. In my case i want replace to "Select top 1". With that a can replace any select to select top 1.

Submitted by Diego Troitiño - 10 years ago