Bug 129613 - NEW FORMAT:Some characters with the any symbol
Summary: NEW FORMAT:Some characters with the any symbol
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.3.3.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Number-Format
  Show dependency treegraph
 
Reported: 2019-12-25 12:48 UTC by Minato
Modified: 2020-05-10 19:39 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Minato 2019-12-25 12:48:01 UTC
Description:
for ex:
INPUT to cell, BC1123DIR190X ->FORMATTED BC1123-DI-R-190-X
or ->FORMATTED BC112:3DIR:R19:0X

I would be very glad if I could make something like phone number formatting 0000-000-0000.

Why is it need: for product code, for members ID, etc


Steps to Reproduce:
I would be very glad if I could make something like phone number formatting 0000-000-0000.



Actual Results:
for ex:
INPUT to cell, BC1123DIR190X ->FORMATTED BC1123-DI-R-190-X
or ->FORMATTED BC112:3DIR:R19:0X

Expected Results:
Why is it need: for product code, for members ID, etc



Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Eike Rathke 2020-03-02 22:12:36 UTC
Your input of BC1123DIR190X is of type Text, hence only the @ format code is applicable. This could work with prefix or suffix literal text like
"prefix "@
or
@" suffix"
but nothing else, no interspersed "display masks" (or whatever one would call that).

You could use the REGEX() function to transform cell content like

  =REGEX("BC1123DIR190X";"(.{6})(..)(.)(\d+)(.*)";"$1-$2-$3-$4-$5")

to "BC1123-DI-R-190-X", or any other exact match.
Comment 2 Buovjaga 2020-05-10 19:39:48 UTC
No reply in 2 months, so I guess reporter is happy with Eike's advice