Welcome Guest

Pages: 1
Regex with Case insensitive not working as expected
LouisMackey111PostMarch 5, 2015, 16:19
Newbie
Posts: 14
Registered:
November 8, 2014, 19:45
Normal topicRegex with Case insensitive not working as expected

Hi all,

I've been working on a set of actions to help clean up my Music Library.

Currently, I'm trying to Clean up some mixed case Roman Numerals; I have Several Regular Expression Finds -- Some ting Like:

Find all matches for Regular Expression " ii" in field Variable 1, Replace with " II" in Field Variable 1, case insensitive, set state

The Actual Field I'm working on contains " Ii." and after I run my action its still the same value and the action state if False.

I'm open to suggestions….

Louis Mackey

2MR2PostMarch 5, 2015, 16:43
Administrator
Posts: 1642
Registered:
August 23, 2012, 19:27
Normal topicRe: Regex with Case insensitive not working as expected

[edited because I pasted in the wrong action copy]

I just created an action as follows:

Set Variable 1 to "Test-Ii-Test Ii Test"
Find all matches for regular expression " ii" in field Variable 1, replace with " II" in field Variable 1, case insensitive, set state
Dump snapshot variables. Show Action Test State.

The output is:

Action test state = true

v0:
v1: Test-Ii-Test·II·Test
v2:
v3:
v4:
v5:
v6:
v7:
v8:
v9:

The first sequence was not changed, as expected and the send was.

I'm not sure what is going wrong in your action. Try placing 'Dump Variables' statements immediately before and after your Regular Expression statement and see the state before and after. (Don't forget to set action test state in the Dump Variables statements).

If there is not some specific reason you want to use regular expressions, then using a Replace statement for this is far far more efficient.

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.044 seconds.