0
What is the definition of 'empty string' in the lesson ?
Explanation in the lesson is too short for learners that are solo...
5 ответов
+ 4
The better way to learn regex is to practice them: little by little, you will be able to do more things with ;)
+ 2
when there is nothing in the string.
myString = "" # empty string using double quotes
or
myString = '' # empty string using single quotes
In regex you'll need to do your regular matching for valid values and then something like using * for 0 or more, or use ? to the pattern optional.
+ 2
@Didier Baudewyns:
Forgot "regex" for the moment, as I think you're enough confused as it is ^^ ( and need a complete course to be a minimal learned... Unfortunately, sololearn doesn't provide ones, but fortunaly, you would find a lot of source on internet )
Else @ChaoticDawg is right anyway: an 'empty" string ( of characters ), is a string with zero count of characters, so printing an empty string will output... nothing :P
0
Thank you to both ! I have already used basic regex in notepad++ but I always struggle with these notions of imaginary points, borders and so on, ?! ... so that I don't really exploit the full power of regex. I will indeed go on (elsewhere also!). The first regex lessons here are not bad orherwise...
0
Try 'some string (a-z)' then you will see the difference.