Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace specified (rather than all) matches with global replacement text #77

Open
allysonsouza opened this issue Jan 14, 2021 · 2 comments
Labels
need-feedback Need's Feedback

Comments

@allysonsouza
Copy link

allysonsouza commented Jan 14, 2021

Summary

As pointed in this topic, would be great to have the option to specify which occurrence to be replaced, rather than all. In my case I'm trying to accomplish a very common scenario: replace all first images inserted in posts, a common issue when a project was previously using a theme that doesn't show the featured image in single.

Actual Behavior

There's no option to change the global matching. (Not an regex expert, I don't know if it's the right term)

Steps to reproduce

Try to match any regex agains first or one specif occurrence.

Environment

Firefox 84.0.2 (64-bits) Windows 10, WordPress 5.6, Search Regex 2.4.1

@johngodley
Copy link
Owner

This is something that will require you to create a regular expression that matches the first occurrence.

@johngodley johngodley added the need-feedback Need's Feedback label Mar 28, 2021
@allysonsouza
Copy link
Author

That's right @johngodley, but from what I understood in the topic mentioned, and from what I remember I have tried, currently the plugin is not supporting that regular expression (not an expert and it's some time since I opened, so I cannot explain better, but the user neilrh1 explained in the topic).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-feedback Need's Feedback
Projects
None yet
Development

No branches or pull requests

2 participants