Removing numbers and emoji
-
i want to remove the number, dot(.) and emoji.
Can someone please provide some suggestionsBEFORE:
1.π― to export
2.π² chain
3.π² process fees
4.π² μκ³ νλ€
5.π― μμ ν
6.π² μμ νλ€AFTER:
to export
chain
process fees
μκ³ νλ€
μμ ν
μμ νλ€ -
Hi @Joss-Medina
Try this:
Place the caret at the beginning of the first line to change. Then open the Find panel and copy the following line:
Find what:
(?-s)^\d+[^ ]+?\x20
Replace with: [leave empty]Select the
Regular expression search mode
, and click theReplace All
button.Hope it helps.
-
This post is deleted! -
Hello, @joss-medina, @astrosofista and All,
@astrosofista, as all the
emoji
symbols, in OP text, have an Unicode code-point over theBasic Mutilingual Plane
( BMP ), so above\x{FFFF}
, ourBoost
regex engine is, generally, not able to find them properly :-(So instead of using a negative character class
[^....]
, which, obviously, does not work, I would suggest the classical regex syntax, below, which matches, from beginning of line, the shortest range of standard characters till aSpace
char :SEARCH
(?-s)^.+?\x20
REPLACE
Leave EMPTY
Best Regards,
guy038
-
Given that @Joss-Medina specifically indicated lines starting with a number, Iβd recommend a hybrid of @astrosofistaβs and @guy038βs solutions:
- FIND WHAT =
(?-s)^\d+.+?\x20
Like @astrosofistaβs solution, this requires that the line start with one or more digits. Like @guy038βs solution, it allows any characters between the digits and the space.
- FIND WHAT =
-
@guy038 said in Removing numbers and emoji:
our Boost regex engine is, generally, not able to find them properly
@guy038, yes sorry, youβre right, I was misguided by my PCRE education :(