Uutiset:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu
Advertisement:

Regex Input Mask for Steam IDs

Aloittaja Bodom, lokakuu 09, 2013, 01:35:56 IP

« edellinen - seuraava »

Bodom

Hello,

I was wondering how to create an input mask for my custom field of Steam IDs. Steam IDs look like this Steam_0:1:123 but may have more digits (Steam_0:1:1234567). I was wondering how to create an input mask for these to stop people from just typing anything in, and still being able to register.

Thanks for your help,
-Bodom

Arantor

Seems to me then that you want something like:

/Steam_0:1:\d+/

Assuming 0:1 are constants and the other digits can be anything. If that's not the case more details will be necessary.
Holder of controversial views, all of which my own.


Bodom

Yes the 0 and 1 is constant.
Thank you for your help! I will post back here after some testing, but I'd assume that you know what you're doing and this should work without an issue.

Thanks again,
-Bodom

P.s.
The other digits are only ever numbers, is there a way to add that?

Arantor

Holder of controversial views, all of which my own.


Bodom

Sorry for the delay in my response, but thanks again! :D

Bodom

Is there a way to make the STEAM entry non-case sensitive?
So you could enter steam, STEAM, Steam or any variation, just as long as its steam then followed by the number.

Arantor

Holder of controversial views, all of which my own.


Bodom


Bodom

Okay so the 1 is not constant xP
I should have checked.. It can be Steam_0:0 or Steam_0:1

Arantor

Holder of controversial views, all of which my own.


Bodom

Sorry, I should have thanked you and marked this as solved.
Thanks for your help, works perfectly!

-Bodom

Arantor

Holder of controversial views, all of which my own.


Advertisement: