Responses
I was hoping I could replace a double newline (\n\n) with a single newline (\n), but it seems I cannot use this tool to insert a special newline character. Is this correct? Or is there a simple workaround I'm not aware of? TY!
Hello Matt,
Thank you for your comment.
Please try to use the Trim Spaces tool instead to remove extra line breaks.
Hope this will work for you.
Thanks for asking this question Pete!
I was looking to evaluate this tool, but my immedite application needs to be able to
use back references in the regex replace, so I will wait unitl the future release.
Hello Bill,
Thank you for your comment. The functionality you need is not available in the current version of the add-in, but our developers will look into the possibility to implement it. Stay tuned ;)
Hi Folks - new to your tools. Very happy to have RegEx!! If I wanted to reference a group in a replace operation, how would I write it? So using your phone number example ... say I wanted to replace a whole phone number with just the area code: my pattern: "(\d{3})-(\d{3})-(\d{4})" And my replace string would look like: "Area Code: $1" or maybe "Area Code: \1". But I get the whole match as if I wrote $0. How should I write it to reference buffer 1 ??
Thanks -
Pete
Hi Peter,
Thank you for your feedback.
Please try to remove extra parentheses from your pattern so it will look like (\d{3}-\d{3}-\d{4}) and check if you get the needed result. If not, then please send us a screenshot showing the add-in pane with the expression you use and the options you specify, the column with the data you want to replace, the result you get and the result you expect to get. You can email it to support@ablebits.com. We'll be happy to help you further.
Thanks for your response. I will send you a screen capture, but first tell me how to express the capture group. IOW I am interested in extracting the first 3 digits as the area code. So the phone# text: 989-555-1234 wold be replaced with Area Code: 989 In other Regex editors and code I would write the phone patter as: (\d{3})[\s.-]?(\d{3})[\s.-]?(\d{4})
and the replace text as: Area Code: $1
How do I express the 1st capture group? $1 does not work and \1 doesn't either
Thanks!
Pete
Pete,
Unfortunately, with the current version of Regex Tools you won't get the result you need. However, our developers are going to improve the add-in functionality in one of the future releases of Ultimate Suite. As a workaround, we can suggest using the Extract Text and Add-Text tools at the moment.
In case you have any other questions or need further assistance, feel free to email us at support@ablebits.com.
Post a comment
Seen by everyone, do not publish license keys and sensitive personal info!