^[0-9]+:
This will look for at the start of each line something like 1:
It's very useful to reformat some java codes which were posted with line number.
Showing posts with label Regular Expression. Show all posts
Showing posts with label Regular Expression. Show all posts
Regular Expression in TextPad
Link
Configure -> Preferences -> Editor
Check "Use POSIX regular expression syntax"
search c.+b
all the following will be found:
c234b
cxyz123b
C123-=b
Search .+=
means anything until=
Special character which needs escaping \
+ ? . * ^ () [] {} | \
. is wildcard
[blabla]
example: [0-9] [a-z]
[^0-9] means non digits
^PATTERN: find pattern at start of line
PATTERN$: find pattern at end of line
for example, search ^todo find line 1, search todo$ find line2.
line 1: todo things
line 2: we will do it. todo
for example,
search c.*b, find 1,2, and 3.
search c.+b, find 2 and 3.
search c.?b, find 1 and 2.
search c.\{3\}b, find 3
search cx\{3\}b, find 3 too
1 cb
2 cab
3 cxxxb
Quantifiers:
Configure -> Preferences -> Editor
Check "Use POSIX regular expression syntax"
search c.+b
all the following will be found:
c234b
cxyz123b
C123-=b
Search .+=
means anything until=
Special character which needs escaping \
+ ? . * ^ () [] {} | \
. is wildcard
[blabla]
example: [0-9] [a-z]
[^0-9] means non digits
^PATTERN: find pattern at start of line
PATTERN$: find pattern at end of line
for example, search ^todo find line 1, search todo$ find line2.
line 1: todo things
line 2: we will do it. todo
for example,
search c.*b, find 1,2, and 3.
search c.+b, find 2 and 3.
search c.?b, find 1 and 2.
search c.\{3\}b, find 3
search cx\{3\}b, find 3 too
1 cb
2 cab
3 cxxxb
Quantifiers:
+ 1 or more times
? 0 or 1 time; item is optional
* 0 or more times; item is optional or repeatable
{N} N times
{N,} N or more times
{N,M} N to M times
Labels:
Regular Expression,
TextPad
Subscribe to:
Posts (Atom)