Not sure what your intent was with that regular expression?

This inserts tabs between columns, based on their width.  You’ll need a second 
pass to remove trailing spaces:

Find:  ^(.{25})(.{16})(.{29})(.{21})(.+)$

^ Anchors to start of line
( Start a capture buffer ( \1 )
. Any single character
{25} That single character 25 times
) End capture buffer

Replace:  \1\t\2\t\3\t\4\t\5

Cheers


> On 2022-11-11, at 09:48, 'Bruce Johnson' via BBEdit Talk 
> <[email protected]> wrote:
> 
> Didn’t work with my example. but this is regexp wizardry beyond my knowledge 
> (or my google-fu is weak today)
> 
> This is what I had in the find box:
> 
> (.(23)) (.(43)) (.(74)) (.(95))
> 
>  Sample data
> 
> Name                      Alias           Database                    
> ProhibitSendQuota    ExternalDirectoryObjectId
> ----                      -----           --------                    
> -----------------    -------------------------
> Name1                    Alias1          NAMPR190000-xxxx             49.5 GB 
> (53,150,220… objid1
> Name2                    Alias2          namPR190000-xxxx             49.5 GB 
> (53,150,220… objid2
> 
> 
> No matches were found so nothing got replaced.
> 
> This was why I loved Columnbo, just drag a marker to the point you wanted the 
> column to start and bang it replaced any string of spaces to a tab character. 
>  Used it to massage large masses of text into tabular data.

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "[email protected]" rather than 
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/B7E3D7AE-68BC-4ACD-980F-765D6BF1F1EB%40gmail.com.

Reply via email to