Skip to main content
added 24 characters in body
Source Link

Now I may be wrong, but I am able to match:

------- from 3 and up

- - - - - from 3 and up

While not matching the 'abc' example (or any line that throws a non-horizontal rule symbol into the mix anywhere in the line), with:

/^[^ \*\*[\-_\t]{3,}$\*_] *[\-\*_] *[\-\*_][\-\*_ \t]*$/ in 6366 steps.

My one concern is that I'm not sure if you are wanting to allow multiple spaces between your horizontal-rule symbols. Because it would also match:

/- - - (or however many spacesthis definitely lets you putadd additional spaces between each symbol, as long as they remain on the same line)symbols.

If the ability to add extra spaces is not a problem though, would this be a legitimate option for shortening the number of search steps required?

You can check out the pattern on regex101regex101

Now I may be wrong, but I am able to match:

------- from 3 and up

- - - - - from 3 and up

While not matching the 'abc' example (or any line that throws a non-horizontal rule symbol into the mix anywhere in the line), with:

/^[ \*\-_\t]{3,}$/ in 63 steps.

My one concern is that I'm not sure if you are wanting to allow multiple spaces between your horizontal-rule symbols. Because it would also match:

/- - - (or however many spaces you put between each symbol, as long as they remain on the same line).

If the ability to add extra spaces is not a problem though, would this be a legitimate option for shortening the number of search steps required?

You can check out the pattern on regex101

Now I may be wrong, but I am able to match:

------- from 3 and up

- - - - - from 3 and up

While not matching the 'abc' example (or any line that throws a non-horizontal rule symbol into the mix anywhere in the line), with:

/^ *[\-\*_] *[\-\*_] *[\-\*_][\-\*_ \t]*$/ in 66 steps.

My one concern is that I'm not sure if you are wanting to allow multiple spaces between your horizontal-rule symbols. Because this definitely lets you add additional spaces between the symbols.

If the ability to add extra spaces is not a problem though, would this be a legitimate option for shortening the number of search steps required?

You can check out the pattern on regex101

Source Link

Now I may be wrong, but I am able to match:

------- from 3 and up

- - - - - from 3 and up

While not matching the 'abc' example (or any line that throws a non-horizontal rule symbol into the mix anywhere in the line), with:

/^[ \*\-_\t]{3,}$/ in 63 steps.

My one concern is that I'm not sure if you are wanting to allow multiple spaces between your horizontal-rule symbols. Because it would also match:

/- - - (or however many spaces you put between each symbol, as long as they remain on the same line).

If the ability to add extra spaces is not a problem though, would this be a legitimate option for shortening the number of search steps required?

You can check out the pattern on regex101