regex


Regex add text to code [duplicate]


I am using the following expression:
Find what: [0-9]
But what should I write in Replace with field if I want to add specific sup tag to all the digits?
Thanks in advance!
The replacement can be
<sup>$0</sup>
or
<sup>$&</sup>
Note that the $0 / ${0} / $&, or even $MATCH and ${^MATCH} backrefrence inserts the whole match.
See the Substitutions section:
$&, $MATCH, ${^MATCH}
The whole matched text.
and
$n, ${n}, \n
Returns what matched the subexpression numbered n. Negative indices are not alowed.
Note that a match value is usually stored as Group 0 inside a match object.
However, \0 as of now does not work (Notepad++ v.6.9), it looks like it is treated as a NUL character and truncates the replacement pattern right at the location where it is located.

Related Links

Bash cp command and quotes
Regex to remove/replace characters before and after string in Notepad++
Get information from file and put in list
regex string that would validate specific alphanumeric format
Pattern matching variable ($1) after doing regex giving incorrect value
Powershell Search a pattern string in two lines together
perl - using HTML to extract data
Regular expression for replacing `<del>` tag inside style and script tag blocks
How to check with regexp that first 2 characters can be letters or digits, but other characters only digits
Vim regex to substitute/escape pipe characters
Match string not containg a certain phrase
Regex compatibility in IE7
Should I Escape Forward and Backslashes? [closed]
Nginx rewrite params/args to directories
Regular expression if a word contains some character then must not contain another character pattern
Using HTTP_HOST to identify the identify the previous host name

Categories

HOME
apache-spark
ffmpeg
svg
codenameone
dicom
serial-port
path
runtime-error
fpdf
regression
python-xarray
tcplistener
telnet
proftpd
tapi
reload
plots.jl
libssh
cmusphinx
swig
stm32f4discovery
pydev
many-to-many
django-autocomplete-light
csom
profiling
core-location
centos6
jtable
gcp
jtapi
ose
jackrabbit
vtable
vue2
amazon-elasticsearch
drupal-webform
bem
hawkular
codeigniter-hmvc
couchbase-lite
mobile-browser
uservoice
wrk
notimplementedexception
infiniband
ammonite
dwr
zbar
autogen
android-touch-event
getelementbyid
mysql-error-1050
jeditorpane
blocking
tfs2008
ultratree
mit-scheme
vb4android
dashing
trello.net
cucumber-java
hl7-v2
thinktecture-ident-server
jedi
sejda
android-listfragment
netbsd
avalonedit
abort
information-schema
iscroll4
prettyfaces
ash
team-explorer-everywhere
spread-toolkit
dirpagination
populate
declspec
acts-as-taggable-on
antisamy
notifyicon
nawk
onejar
programmers-notepad
hresult
jflow
guice-servlet
src
datadesign
square-cube
rc-shell
rpn
nextpeer
mdi
servletunit
polyglot
queryanalyzer
sloc
case-tools

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App