patterns question
Started by KingofGamesYami, May 20 2014 03:53 AM
8 replies to this topic
#1
Posted 20 May 2014 - 03:53 AM
Is there any way to make a pattern that expects 0 or more characters? "%a+" accepts 1+, "%a?" accepts 0 or 1. Would I simply combine the two ("%a?+" or "%a+?")? Or would I simply have to make an extra elseif statement?
#3
Posted 20 May 2014 - 04:29 AM
theoriginalbit, on 20 May 2014 - 04:21 AM, said:
if you read this link, you'll find that - and * are both 0 or more repetitions, so it would be "%a*" or "%a-"
#4
Posted 20 May 2014 - 03:32 PM
You can use "or" in patterns? O.o
#6
#7
Posted 20 May 2014 - 08:42 PM
As far as I know you could just use (for an or) "[AB]" which would result in searching for A or B.
#9
Posted 20 May 2014 - 09:29 PM
apemanzilla, on 20 May 2014 - 03:59 PM, said:
I was simply stating two different ways of doing what I thought might work...
%a+? and %a?+
my logic:
%a+? would check for multiple characters, but they can be none because the entire statement has ? after it
%a?+ checks for one or more "maybe" space characters
--This is irrelevant I know what I'm using now--
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users











