Replace a forward slash with hyphen

Discuss WordPipe, ExcelPipe and PowerPointPipe. Get help with installation and running, notify us of bugs, request new features and enhancements.

Moderators: DataMystic Support, Moderators

TomQA
Posts: 10
Joined: Tue Jan 22, 2013 1:54 am

Replace a forward slash with hyphen

Postby TomQA » Tue Jan 22, 2013 2:19 am

Hello,
I need to replace a forward slash with a hyphen. An example of the string format is -F102/5.2 and I want to replace the slash with the hypen to produce -F102-5.2. I tried search for \-F*\/ and replace with \-F*\- but that did not work.
Thank you in advance.

User avatar
DataMystic Support
Site Admin
Posts: 2154
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Replace a forward slash with hyphen

Postby DataMystic Support » Wed Jan 23, 2013 8:42 pm

Ensure wildcard matching is on, then search for:

Code: Select all

-F([0-9]{1,})/


Replace with

Code: Select all

-F\1-
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

TomQA
Posts: 10
Joined: Tue Jan 22, 2013 1:54 am

Re: Replace a forward slash with hyphen

Postby TomQA » Thu Jan 24, 2013 2:54 pm

Hi Simon,

First, thanks for getting back to me. I did not try Wildcards. I didn't tell you that this part of the string "FSSQA-F102" is in the Built-in Property, "Document number" and the slash "/" is not in any Property and the "5.2" is in Custom Property, "DocRevision". So the result should be "-F102-5.2". The entire footer looks like this:

FSSQA-F102/5.2 Corrective Preventive Action Request Page 1 of 1 Approved: TFS Effective: 4/3/2008

Your solution didn't make any changes, but then I didn't give you all of the information.
What can I try next?

Thank you,

Tom

User avatar
DataMystic Support
Site Admin
Posts: 2154
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Replace a forward slash with hyphen

Postby DataMystic Support » Fri Jan 25, 2013 2:30 pm

Hi Tom,

What does the raw value of the footer look like without the properties values substituted?
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

TomQA
Posts: 10
Joined: Tue Jan 22, 2013 1:54 am

Re: Replace a forward slash with hyphen

Postby TomQA » Sat Jan 26, 2013 3:03 pm

Hi Simon,

I don't know what you mean by "raw value". If you show the fields using Alt+F9, it looks like this:
{ DOCPROPERTY "Document number" \*MERGEFORMAT } / { DOCPROPERTY DocRevision \*MERGEFORMAT }

Is there a way for me to send you my docx?

Tom

User avatar
DataMystic Support
Site Admin
Posts: 2154
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Replace a forward slash with hyphen

Postby DataMystic Support » Sat Jan 26, 2013 3:30 pm

Sorry To, for some reason I thought you were doing this with ExcelPipe on Excel footers.

Can you set the location just to Footer, and specify replace / with - ?
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments


Return to “WordPipe, ExcelPipe and PowerPointPipe Support”

Who is online

Users browsing this forum: No registered users and 4 guests