Ignore characters when counting match length
-
The following search-and-replace inserts newlines to format lines to a maximum length of 24 characters
Find: (.{1,23} )
Replace with: $0\nInput:
Now is the time for all good men to come to the aid of the communist party.Output:
Now is the time for all
good men to come to the
aid of the communist
party.Note that the line break always occurs after a space, and there must be a space at the end of the line for it to work.
My question is: Is there a way for Npp to ignore certain character? That is, can it not count a designated character as contributing to the line length? For instance with the full block character:
Input:
Now is the time ██████████for all good men to come to the aid of the communist party.Output:
Now is the time ██████████for all
good men to come to the
aid of the communist
party.More ambitions, could it ignore a sequence of characters defined by regex, for instance HTML tags:
Input:
Now is the time for all good <span style="color:FF00FF;>men</span> to come to the aid of the communist party.Output:
Now is the time for all
good <span style="color:FF00FF;>men</span> to come to the
aid of the communist
party. -
@Stefan-Travis said in Ignore characters when counting match length:
Is there a way for Npp to ignore certain character?
Depends.
Instead of using
.
in the regex (which means “any character”), use a character class which defines what you do or don’t want. For example,[^█]{1,23}
would match 1-23 non-█ characters. However, I don’t think that’s exactly what you want.I think the easiest way to match this would be “match 1 to 23 instances of (any non-█, followed by 0 or more █)”.
Now is the time ██████████for all good men to come to the aid of the communist party.
- FIND =
([^█\r\n]█*){1,23}\h
- parenthesis used for grouping so that
{1,23}
can apply to that group [^█\r\n]
says “match any character except █, CR, and LF”- the
█*
says greedily match zero or more █ that come after the any-character-except - the
\h
matches either space or tab, and is used to make the space in the regex more obvious; if you only want space but not tab to be included, replace that with\x20
instead.
- parenthesis used for grouping so that
- REPLACE =
$0\n
Now is the time ██████████for all good men to come to the aid of the communist party.
More ambitious
Hmm… since the
(...)
can handle any regex as a sub-expression, it should be doable.Now is the time for all good <span style="color:FF00FF;>men</span> to come to the aid of the communist party.
- FIND =
(.(<[^>]+?>)*){1,23}\h
- the dot matches any character (obeying
. matches newline
checkbox) - the
(...)*
says "followed by zero or more of what’s contained - the
<[^>]+?>
says “open bracket, followed by one or more non-close-bracket (non-greedy), followed by first close-bracket it hits”. That is then the contents of the(...)*
above
- the dot matches any character (obeying
- REPLACE =
$0\n
Now is the time for all good <span style="color:FF00FF;>men</span> to come to the aid of the communist party.
-----
Please Read And Understand This
FYI: I often add this to my response in regex threads, unless I am sure the original poster has seen it before. Here is some helpful information for finding out more about regular expressions, and for formatting posts in this forum (especially quoting data) so that we can fully understand what you’re trying to ask:
This forum is formatted using Markdown. Fortunately, it has a formatting toolbar above the edit window, and a preview window to the right; make use of those. The
</>
button formats text as “code”, so that the text you format with that button will come through literally ; use that formatting for example text that you want to make sure comes through literally, no matter what characters you use in the text (otherwise, the forum might interpret your example text as Markdown, with unexpected-for-you results, giving us a bad indication of what your data really is).Images can be pasted directly into your post, or you can hit the image button. (For more about how to manually use Markdown in this forum, please see @Scott-Sumner’s post in the “how to markdown code on this forum” topic, and my updates near the end.) Please use the preview window on the right to confirm that your text looks right before hitting SUBMIT. If you want to clearly communicate your text data to us, you need to properly format it.
If you have further search-and-replace (“matching”, “marking”, “bookmarking”, regular expression, “regex”) needs, study the official Notepad++ searching using regular-expressions docs, as well as this forum’s FAQ and the documentation it points to. Before asking a new regex question, understand that for future requests, many of us will expect you to show what data you have (exactly), what data you want (exactly), what regex you already tried (to show that you’re showing effort), why you thought that regex would work (to prove it wasn’t just something randomly typed), and what data you’re getting with an explanation of why that result is wrong. When you show that effort, you’ll see us bend over backward to get things working for you. If you need help formatting, see the paragraph above.
Please note that for all regex and related queries, it is best if you are explicit about what needs to match, and what shouldn’t match, and have multiple examples of both in your example dataset. Often, what shouldn’t match helps define the regular expression as much or more than what should match.
Here is the way I usually break down trying to figure out a regex (whether it’s for myself or for helping someone in the forum):
- Compare what portions of each line I want to match is identical to every other one (“constants”), and what parts do I want to allow to be different in each line (“variables”) but still be part of the match.
- Look at both the variables and constants, and see what portions of each I’ll want to keep or move around, vs which parts get thrown away completely. Each sub-component that I want to keep will be put in a regex group. Anything that gets completely thrown away doesn’t need to be in a group, though sometimes I put it in a numbered
(___)
or unnumbered(?:___)
group anyway, if I have a good reason for it. Anything that needs to be split apart, I break into multiple groups, instead of having it as one group.
- For each group, I do a mental “how would I describe to my son how to correctly match these characters?” – which should hopefully give me a simple, foolproof algorithm of characters that must match or must not match; then I ask, “how would I translate those instructions into regex sequences?” If I don’t know the answer to the second, I read documentation, or ask a specific question.
- try it, debug, iterate.
- FIND =
-
Hi, @stefan-travis, @peterjones and All,
Peter, you’ve found out a very clever and elegant way to solve Stefan’s problem ! It took me a little while to figure out all ;-))
Your idea is to associate any single allowed character to a possible range of consecutive non-allowed characters, in order that this allowed char + all non-allowed chars simply count for one single character !
Your idea can be extended to several non-allowed characters, as well ;-)) For instance if, we suppose that the characters
▲
►
▼
and◄
are non-allowed chars, in the counting process, just use the regex :SEARCH
([^►▲▼◄\r\n][►▲▼◄]*){1,23}\h
Just test it with this subject string, below.
123►►►►4567▼▼▼▼8 012▲345 7890◄◄◄◄◄123 56◄◄►►7890 234 67◄◄►►890 23▲▼▲▼▲▼▲▼4 678►►90◄◄12
Remember that the space char is an allowed char and so, counts for
1
char !You should get :
123►►►►4567▼▼▼▼8 012▲345 7890◄◄◄◄◄123 56◄◄►►7890 234 67◄◄►►890 23▲▼▲▼▲▼▲▼4 678►►90◄◄12
And you simply adopted the same idea, in your second regex, in order to associate any single standard character to a possible range
< ..... >
, not containing a>
character inside. Great !I think, however, that we could simplify the part
<[^>]+?>
to the syntax<.+?>
, with the lazy quantifier+?
, which gives :(?-s)(.(<.+?>)*){1,23}\h
Best Regards,
guy038
-
@guy038 said in Ignore characters when counting match length:
simplify the part
<[^>]+?>
to the syntax<.+?>
As with my posts, my regexes can tend to be more wordy than they need to be. For regexes, I tend toward the wordy if I think it will help me clarify to myself what I’m trying to do (or if it’s the first way I think of doing it, and don’t go back and look for ways to simplify it). But yes, your simplification is a much better form of the regex.
-
These are neat and clever solutions, with one problem: If the length of the HTML tag is longer than (in this case) 23 characters, spaces within the tag become “false positives” for detecting appropriate positions to insert line breaks.
If the long tags contain no spaces, we get false positives in the plain text. Examples:
Input:
Now is the time for all <short tag>good men to come to the aid of the communist party.
Output:
Now is the time for all <short tag>good men to come to the aid of the communist party.
Input:
Now is the time for all <long tag long tag long tag long tag long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party.
Output:
Now is the time for all <long tag long tag long tag long tag long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party.
Input:
Now is the time for all <longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party.
Output:
Now is the time for all <longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party.
I’m pretty sure this can’t be solved in RegeEx, but should be fairly simple in Python. So, thanks for help in clarifying.
-
Hello, @stefan-travis and All,
Lost ! There are regex solutions ;-))
Can you try these two regex S/R, where I’m using the free-spacing mode
(?x)
:- SEARCH A : (?x-s) (^|\G) ( [^<\r\n] (<.+?>)? | <.+?> ){1,23} (\h|(?=<)) - REPLACE A : $0\r\n ( or $0\n for UNIX files )
or, more simple :
- SEARCH B : (?x-s) (^|\G) ( [^<\r\n] | <.+?> ){1,23} (\h|(?=<)) - REPLACE B : $0\r\n ( or $0\n for UNIX files )
NOTES :
-
I assume that all your lines end with a space or tab character
-
In search regex A, any char, different from
<
, possibly followed with a tag<.....>
OR all the tag, itself, counts for1
character -
In search regex B, any char, different from
<
OR the entire tag<........>
counts for1
character. This logic seems the best ! -
Note that if a word, outside a tag, contains more than
23
chars long, replacement stops, as no blank char can be found and process restarts next line ( See the last line of each sample text, below )
Test search regex
A
andB
against this sample, below :Now is the time for all <long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. Now is the time for all 1<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. Now is the time for all 12<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. Now is the time for all 123<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. Now is the time for all 1234<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. Now is the time for all 12345<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. Now is the time for all 123456<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. Now is the time for all 1234567<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. Now is the time for all 12345678<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. Now is the time for all 123456789<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. Now is the time for all 1234567890<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. Now is the time for all 12345678901<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. Now is the time for all 123456789012<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. Now is the time for all 1234567890123<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. Now is the time for all 12345678901234<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. Now is the time for all 123456789012345<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. Now is the time for all 1234567890123456<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. Now is the time for all 12345678901234567<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. Now is the time for all 123456789012345678<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. Now is the time for all 1234567890123456789<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. Now is the time for all 12345678901234567890<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. Now is the time for all 123456789012345678901<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. Now is the time for all 1234567890123456789012<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. Now is the time for all 12345678901234567890123<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. Now is the time for all 123456789012345678901234<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party.
and :
Now is the time for all <longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. Now is the time for all 1<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. Now is the time for all 12<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. Now is the time for all 123<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. Now is the time for all 1234<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. Now is the time for all 12345<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. Now is the time for all 123456<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. Now is the time for all 1234567<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. Now is the time for all 12345678<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. Now is the time for all 123456789<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. Now is the time for all 1234567890<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. Now is the time for all 12345678901<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. Now is the time for all 123456789012<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. Now is the time for all 1234567890123<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. Now is the time for all 12345678901234<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. Now is the time for all 123456789012345<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. Now is the time for all 1234567890123456<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. Now is the time for all 12345678901234567<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. Now is the time for all 123456789012345678<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. Now is the time for all 1234567890123456789<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. Now is the time for all 12345678901234567890<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. Now is the time for all 123456789012345678901<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. Now is the time for all 1234567890123456789012<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. Now is the time for all 12345678901234567890123<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. Now is the time for all 123456789012345678901234<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party.
Additional questions :
-
How many HTML tags
<...........>
per line ? -
Is any HTML tag
<...........>
preceded with aspace
character ( If yes, I’ll then able to shorten search regexes ! )
See you later,
Best Regards,
guy038
-
-
That is… an utterly brilliant solution. Essentially treating tags as single characters.
To answer your questions:
How many HTML tags <…> per line? Most, none at all. 1 in 10, 4-8. Extremely unlikely any will contain 23 or more.
Is any HTML tag <…> preceded with a space character? Frequently.Details, probably making no difference:
Processing is “in selection” one paragraph at a time, So I can use this search string:([^<]|<.+?>){1,23}
The number of characters/tags per line is determined by a “pseudotag” at the end of the paragraph. So first I do this search:
([^<]|<.+?>){1,23} (?=.*<Narrow>$)
And then this:
([^<]|<.+?>){1,71} (?=.*<Wide>$)
I’m simplifying by talking about HTML tags and newlines - actually I’m using a kind of markup, but it gets rather complex.
-
Hi, @stefan-travis and All,
No problem ! We can merge the
2
cases in an unique search regex, and using the free-spacing mode ;-))GROUPS : 1 2 3 4 5 v v v v v SEARCH : (?x-s) (^|\G) ( ( [^<\r\n]|<.+?> ){1,23} (\h|(?=<)) (?=.*<Narrow>$) | (?3){1,71} (\h|(?=<)) (?=.*<Wide>$) ) REPLACE : $0\r\n ( or $0\n for UNIX files )
-
This regex only matches text in lines ending with the pseudo-tag
<Narrow>
or<Wide>
. All other lines are ignored ! -
Note that the subroutine call
(?3)
does not represent the present contents of group3
, as it would be with the\3
or$3
syntaxes, but, really, the regex[^<\r\n]|<.+?>
-
Note, also, that I preferred to use the
[^<\r\n]
character class ( instead of[^<]
) to be sure that the overall match does not cover2
or more successive lines. It’s up to you : just give it a try !
Test this regex against all the examples, below. Note that I don’t forget the final space char, before each pseudo-tag !
===== Some lines, with a LONG tag containing SPACE chars, and ending with the PSEUDO-tag <Narrow> : Now is the time for all <long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> Now is the time for all 1<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> Now is the time for all 12<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> Now is the time for all 123<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> Now is the time for all 1234<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> Now is the time for all 12345<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> Now is the time for all 123456<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> Now is the time for all 1234567<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> Now is the time for all 12345678<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> Now is the time for all 123456789<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> Now is the time for all 1234567890<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> Now is the time for all 12345678901<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> Now is the time for all 123456789012<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> Now is the time for all 1234567890123<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> Now is the time for all 12345678901234<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> Now is the time for all 123456789012345<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> Now is the time for all 1234567890123456<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> Now is the time for all 12345678901234567<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> Now is the time for all 123456789012345678<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> Now is the time for all 1234567890123456789<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> Now is the time for all 12345678901234567890<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> Now is the time for all 123456789012345678901<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> Now is the time for all 1234567890123456789012<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> Now is the time for all 12345678901234567890123<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> Now is the time for all 123456789012345678901234<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Narrow> ===== Some lines, with a LONG tag containing SPACE chars, and ending with the PSEUDO-tag <Wide> : Now is the time for all <long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Wide> Now is the time for all 1<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Wide> Now is the time for all 12<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Wide> Now is the time for all 123<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Wide> Now is the time for all 1234<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Wide> Now is the time for all 12345<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Wide> Now is the time for all 123456<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Wide> Now is the time for all 1234567<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Wide> Now is the time for all 12345678<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Wide> Now is the time for all 123456789<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Wide> Now is the time for all 1234567890<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Wide> Now is the time for all 12345678901<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Wide> Now is the time for all 123456789012<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Wide> Now is the time for all 1234567890123<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Wide> Now is the time for all 12345678901234<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Wide> Now is the time for all 123456789012345<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Wide> Now is the time for all 1234567890123456<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Wide> Now is the time for all 12345678901234567<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Wide> Now is the time for all 123456789012345678<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Wide> Now is the time for all 1234567890123456789<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Wide> Now is the time for all 12345678901234567890<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Wide> Now is the time for all 123456789012345678901<long tag long tag long tag long tag long tag long tag>good men to come to the aid of the communist party. <Wide> ===== Some lines, with a LONG tag without SPACE char, and ending with the PSEUDO-tag <Narrow> : Now is the time for all <longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> Now is the time for all 1<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> Now is the time for all 12<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> Now is the time for all 123<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> Now is the time for all 1234<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> Now is the time for all 12345<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> Now is the time for all 123456<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> Now is the time for all 1234567<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> Now is the time for all 12345678<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> Now is the time for all 123456789<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> Now is the time for all 1234567890<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> Now is the time for all 12345678901<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> Now is the time for all 123456789012<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> Now is the time for all 1234567890123<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> Now is the time for all 12345678901234<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> Now is the time for all 123456789012345<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> Now is the time for all 1234567890123456<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> Now is the time for all 12345678901234567<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> Now is the time for all 123456789012345678<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> Now is the time for all 1234567890123456789<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> Now is the time for all 12345678901234567890<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> Now is the time for all 123456789012345678901<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> Now is the time for all 1234567890123456789012<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> Now is the time for all 12345678901234567890123<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> Now is the time for all 123456789012345678901234<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Narrow> ===== Some lines, with a LONG tag without SPACE char, and ending with the PSEUDO-tag <Wide> : Now is the time for all <longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Wide> Now is the time for all 1<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Wide> Now is the time for all 12<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Wide> Now is the time for all 123<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Wide> Now is the time for all 1234<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Wide> Now is the time for all 12345<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Wide> Now is the time for all 123456<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Wide> Now is the time for all 1234567<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Wide> Now is the time for all 12345678<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Wide> Now is the time for all 123456789<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Wide> Now is the time for all 1234567890<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Wide> Now is the time for all 12345678901<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Wide> Now is the time for all 123456789012<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Wide> Now is the time for all 1234567890123<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Wide> Now is the time for all 12345678901234<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Wide> Now is the time for all 123456789012345<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Wide> Now is the time for all 1234567890123456<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Wide> Now is the time for all 12345678901234567<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Wide> Now is the time for all 123456789012345678<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Wide> Now is the time for all 1234567890123456789<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Wide> Now is the time for all 12345678901234567890<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Wide> Now is the time for all 123456789012345678901<longtagwithoutspaceslongtagwithoutspaceslongtagwithoutspaces>good men to come to the aid of the communist party. <Wide>
Best Regards,
guy038
-
-
Any ideas when I look at this old posting, I see wackiness?
I don’t remember it looking this way originally.
Sample, where I point to some of what looks “wacky”: -
@Alan-Kilborn said in Ignore characters when counting match length:
I don’t remember it looking this way originally.
Actually, I think it probably did.
In the original post, Stefan said, “For instance with the full block character” – the “full block character” is
U+2588 FULL BLOCK █
. When I copied the character from the OP and pasted it in that website’s search, it matches that same character. -
Ah, okay, I didn’t (re)read the old thread closely enough. I thought something was going wacky with my browser or the site. I was thinking that old thread might be useful HERE, but maybe I was stuck on the “one-step” approach in my thinking (I think @guy038 always has us thinking one-step!), but I like Terry’s multi-step thoughts for that thread now.