3 ms·
> how do you find a "__bold__ in a phrase" or "bold in a __phrase__" reliably? Can't you use regex? _[^_\n\r]+_ edit: I think double underscores are easier,
by evandale 3y ago
> how do you find a "__bold__ in a phrase" or "bold in a __phrase__" reliably?
Can't you use regex?
_[^_\n\r]+_
edit: I think double underscores are easier, you should be able to use __.+__ and there's no reason to have to avoid matching single_underscore words.
- eviks 3y agoI meant searching for a "bold in a phrase" phrase when it can have various markup in arbitrary places (also, it's not just __, you might have some other valid marker) But anyway, you can't really use regex here as it's too complicated and error prone for such a frequently needed operation, you need a better mechanism line index or a built in functionality to ignore all markup