Regular Expressions 101

Find a select or select top in a query

Open Workspace
  • JavaScript
  • Match
1

Regular Expression

/
(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