Regular Expressions

Från Wikipedia, den fria encyklopedin.

Search and replace patterns

Replace \"abcd\" with 'abcd'

RegExp:

\\"([^']*?)\\"

Replace pattern:

'$1'

Also note that we don't allow single quote signs (=[^']) and that we perform lazy search (=*?)

(Used in Eclipse)

Rename mediawiki links

RegExp:

\* *\[([^ ]*) ([^]]*)\]

Replace pattern:

* \2 [\1 (länk)]

Will replace:

 *[http://www.pxserver.com/WinAudit.htm WinAudit]

with

 * WinAudit [http://www.pxserver.com/WinAudit.htm (länk)]

(used in Notepad++)

Software