I'm trying to split a string using regular expressions while retaining the regex used to split, but I haven't been able to figure out how to do it. Additionally, NSRegularExpression doesn't seem to work well on swift 3, at least while in the playground that is. whenever I use it I get an error saying that NSRegularExpression is an unresolved identifier, even when I am just copying supposedly swift 3 compliant code
ok so i've figured out that i can use re.findall(r'[A-Z]{3}[0-9]{3}:+([A-Z]*)',classes, re.X) on that string, but for some reason it only returns the string "THIS" instead of the desired "THIS COURSE IS ABOUT CHINESE" how can I get it to do the capital letters search while ignoring whitespace?
hey, another question. I want to be able to get all continuous capital letters between the triple letter/triple #. For instance, if I had a string like, "CHI110:THIS COURSE IS ABOUT CHINESE blah blah blah" I would want it to return "THIS COURSE IS ABOUT CHINESE" how would I go about doing that
but for some reason searchObj.group(0) only returns CHI110 instead of the expected output of CHI110 CHI120 when I try searchObj.group(1) I am informed that this group doesn't exist. Am I making an obvious mistake or what?
ok this is driving me insane. I have a random string I made: classes = "fdafasfas CHI110 dadfsafs CHI120 kj" and I search this string with the linesearchObj = re.search(r'CHI[0-9]{3}\b', classes, re.M|re.I)
I asked this question 17 days ago stackoverflow.com/questions/38190045/… and it would be super helpful to have some pointers on how to fix the python output so that php doesn't return a blank
is there an issue with the line from multiprocessing import Pool in python 2? I copied the first example from [this documentation][docs.python.org/2/library/multiprocessing.html] and just got an error
I have a python script that basically does a lookup for the price of a textbook on amazon and then returns the price. it works well when run thru IDLE/terminal, but when I try to execute the script thru php echo exec("python file path $variables"); I only get a null value in return. I'd really appreciate some help lol
hey, bit of a php noob. running a python script thru php with echo exec... but for some reason I'm getting a null value instead of the terminal output. The script works perfectly when run thru terminal. Can someone please check this out? stackoverflow.com/questions/38190045/…