2

I have started using Workflow on iOS to help speed up tasks at work. One of those is entering delivery records into the computer (via the iPad barcode scan function) instead of manually writting down the ref code and then typing it in.

Workflow has a "Replace Text" function that can be used with regexs to strip out characters etc.

I have managed to find a regex to get rid of the last digit in a scan (a checksum digit, always a capital letter).

The regex is simple.

.{0}-$. 

This goes in the "Find Text" field. The "Replace With" is left empty. It works wonderfully.

How can adapt this to work with other scan types with other scan types where I want to specically get rid of the FIRST character only? I've searched the forums but can only find long and difficult to interpret regexes that I am sure won't do what I am trying to achive, something simple by comparison.

An example is of what I mean is to convert "Y300006944" to "300006944"

aydinugur
  • 1,208
  • 2
  • 14
  • 21
William Lombard
  • 337
  • 1
  • 3
  • 14

2 Answers2

4

You can use the following regex:

^.(.*)$

with a backreference $1 that you can use as replacement.

Good luck.

Allan
  • 12,117
  • 3
  • 27
  • 51
1

Thanks to those who contributed somehting useful :)

I got the it resolved by using the "Split Text" function in Workflow for iOS.

I gave it the command to split based on a customer char, "Y" in this case. It's enough in this simple case.

William Lombard
  • 337
  • 1
  • 3
  • 14