We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
@WilDoane writes:
I think [^:]* is matching \n.
In the example below, the regexp will match the first line and all characters on the second line prior to the colon.
[^:]* #### hhhh a: jwjwjw
That is, the above example matches #### hhhh\na
#### hhhh\na
Compare the above regexp to an expression that matches anything not a colon that is followed by a newline:
[^:\n]* #### hhhh a: jwjwjw
The modified expression stops matching at the newline, so one could capture just the #### hhhh part.
#### hhhh
Subsequently, the JavaScript might be able to be rewritten as:
var speechWithSpeaker = /^\s*([^\n:]*):\s+(.*)/;
Sorry, something went wrong.
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: