Validation Regex no spaces trailing, leading or inbetween

Khalnayak
Kilo Sage

Hi all,

I have a Validation regex for a field within a catalogue item. 

It currently does not allow the characters [^"();:<>]+ which works fine.

But now I need to prevent spaces being entered at the beginning, middle or end, how can I do this?

Can I add some characters to the current regular expressions field?

find_real_file.png

 

Thanks in advance,

Usmaan.

Kieran Anson
Kilo Patron

Can you try the following?

^[A-Za-z0-9\.]*$

 

find_real_file.png

Hi Kieran, I need to retain the current validation regex characters I already have which are [^"();:<>]+

can you include the above within your suggested regex please?

Can use this

^[^"();:<>\s]+$

Thanks Kieran,

I used the regex above but that only prevents spaces inbetween the words and does not prevent leading or trailing spaces which i mainly need.